You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
422 B
20 lines
422 B
namespace Connected.Collections.Concurrent;
|
|
|
|
public enum DispatcherProcessBehavior
|
|
{
|
|
Parallel = 1,
|
|
Queued = 2
|
|
}
|
|
|
|
public interface IDispatcher<TArgs, TJob> : IDisposable
|
|
where TJob : IDispatcherJob<TArgs>
|
|
{
|
|
bool Dequeue(out TArgs? item);
|
|
bool Enqueue(TArgs item);
|
|
bool Enqueue(string queue, TArgs item);
|
|
DispatcherProcessBehavior Behavior { get; }
|
|
|
|
CancellationToken CancellationToken { get; }
|
|
void Cancel();
|
|
}
|