Show / Hide Table of Contents

Class AsyncChunkedProcessedQueue<TWorkItem, TChunkProcessor, TChunkHandler>

Base class for queue or FIFO that is processed in chunks.

Inheritance
Object
AsyncChunkedProcessedQueue<TWorkItem, TChunkProcessor, TChunkHandler>
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 for processing or it is passed to a new one.
The processes queued items until the queue is emptied and then dies. If there are no current working on the queue, a new one is created.

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 for processing or it is passed to a new one.
The processes queued items until the queue is emptied and then dies. If there are no current working on the queue, a new one is created.

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 for processing or it is passed to a new one.
The processes queued items until the queue is emptied and then dies. If there are no current working on the queue, a new one is created.

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 for processing or it is passed to a new one.
The processes queued items until the queue is emptied and then dies. If there are no current working on the queue, a new one is created.

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 for processing or it is passed to a new one.
The processes queued items until the queue is emptied and then dies. If there are no current working on the queue, a new one is created.

Extension Methods

EnumUtil.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top