Represents a dispatcher/buffer. Buffer elements and processes them sequentially on a different thread.
More...
|
| Dispatcher (int size) |
| Constructor.
|
|
void | Start () |
| Starts the dispatcher.
|
|
void | Stop () |
| Enforce stop of dispatcher.
|
|
void | StopAndProcess () |
| Stops the dispatcher. Processes all unprocessed items.
|
|
void | Enqueue (object obj) |
| Enqueue item.
|
|
|
bool | IsRunning [get] |
| Returns true when the dispatcher is running.
|
|
|
Processed | Processed = null |
| Item has been processed event.
|
|
|
void | ProcessQueue () |
| Process the queue.
|
|
|
int | tailIndex = 0 |
| Latest item index in queue.
|
|
int | headIndex = 0 |
| Latest processed item in the queue.
|
|
ManualResetEventSlim | wait = new ManualResetEventSlim() |
| Wait.
|
|
object[] | queue |
| Queue of items.
|
|
int | size = 0 |
| Size of queue.
|
|
bool | isRunning = false |
| The dispatcher is running.
|
|
Thread | processThread |
| Process thread.
|
|
Represents a dispatcher/buffer. Buffer elements and processes them sequentially on a different thread.
◆ Dispatcher()
Tools.Dispatch.Dispatcher.Dispatcher |
( |
int | size | ) |
|
◆ Enqueue()
void Tools.Dispatch.Dispatcher.Enqueue |
( |
object | obj | ) |
|
The documentation for this class was generated from the following file:
- Z:/x4t/src/Tools/Dispatch/Dispatcher.cs