Class DispatchQueue<T>
A dispatch queue.
Inheritance
System.Object
DispatchQueue<T>
Implements
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class DispatchQueue<T> : object, IDispatchQueue<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
DispatchQueue(Action1<T>)
Initializes a new instance of the DispatchQueue<T> class.
Declaration
public DispatchQueue(Action1<T> action)
Parameters
Type | Name | Description |
---|---|---|
Action1<T> | action | The processing action. |
DispatchQueue(Function1<T, Future<Object>>)
Initializes a new instance of the DispatchQueue<T> class.
Declaration
public DispatchQueue(Function1<T, Future<object>> func)
Parameters
Type | Name | Description |
---|---|---|
Function1<T, Future<System.Object>> | func | The processing function. |
Properties
QueueCount
Gets the number of items in the queue.
Declaration
public long QueueCount { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
Destroy()
Destroys the queue.
Declaration
public void Destroy()
Enqueue(T)
Enqueues an item for processing.
Declaration
public void Enqueue(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item. |
WaitForDrain()
Blocks until the queue is empty.
Declaration
public void WaitForDrain()