Class AsyncChunkedProcessedQueue<TWorkItem, TChunkProcessor, TChunkHandler>
Base class for queue or FIFO that is processed in chunks.
Namespace: SuperOffice.Threading
Assembly: SoCore.dll
Syntax
public class AsyncChunkedProcessedQueue<TWorkItem, TChunkProcessor, TChunkHandler> : Object where TChunkProcessor : QueueAsyncChunkProcessor<TWorkItem>, new()
where TChunkHandler : QueueAsyncChunkHandler<TWorkItem, TChunkProcessor>, new()
Type Parameters
Name | Description |
---|---|
TWorkItem | The type that is in the queue |
TChunkProcessor | The processor that processes a chunk of the queue. |
TChunkHandler | Handler holding the thread and is using the processor for processing a chunk of the queue. |
Remarks
As items are added to the queue it is either passed to an exsisting
The
Constructors
AsyncChunkedProcessedQueue()
Base class for queue or FIFO that is processed in chunks.
Declaration
public AsyncChunkedProcessedQueue()
Remarks
As items are added to the queue it is either passed to an exsisting
The
Properties
CurrentHandler
Get the currently executing handler.
Declaration
protected TChunkHandler CurrentHandler { get; }
Property Value
Type | Description |
---|---|
TChunkHandler |
Remarks
As items are added to the queue it is either passed to an exsisting
The
QueueLength
Obtain the length the remaining items in the currently processed queue chunk,
Declaration
public int QueueLength { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
As items are added to the queue it is either passed to an exsisting
The
Methods
Enqueue(TWorkItem)
Put an item in the queue and consequently schedule it to be processed
Declaration
public void Enqueue(TWorkItem workItem)
Parameters
Type | Name | Description |
---|---|---|
TWorkItem | workItem |
Remarks
As items are added to the queue it is either passed to an exsisting
The