Show / Hide Table of Contents

Class QueuedThreadBase<TAsynchronousHandlerProcessor, TAsynchronousArgument>

This class is a base class for execution strategies that queue asynchronous work.

Inheritance
Object
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>
QueuedThreadBase<TAsynchronousHandlerProcessor, TAsynchronousArgument>
GlobalQueuedThreadBase<TAsynchronousHandlerProcessor, TAsynchronousArgument>
ThreadStaticQueuedThreadBase<TAsynchronousHandlerProcessor, TAsynchronousArgument>
Inherited Members
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.ToString()
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.OnSetup(TAsynchronousArgument)
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.SynchronousSetup(TAsynchronousArgument)
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.AsynchronousOperation()
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.ScheduleNewWork()
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.ExecuteWork()
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.Processor
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.WasSetupCalled
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.HasWorkToDo
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.ThreadName
Namespace: SuperOffice.Threading
Assembly: SoCore.dll
Syntax
public abstract class QueuedThreadBase<TAsynchronousHandlerProcessor, TAsynchronousArgument> : AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument> where TAsynchronousHandlerProcessor : AsynchronousHandlerProcessor<TAsynchronousArgument>, new()
    where TAsynchronousArgument : class
Type Parameters
Name Description
TAsynchronousHandlerProcessor
TAsynchronousArgument
Remarks

This class provides a queued execution strategy. However, it does not provide a concrete implementation of the queue itself, since there are several ways to skin that particular cat.

Constructors

QueuedThreadBase()

Constructor, only called from derived classes.

Declaration
protected QueuedThreadBase()

Properties

WorkInformation

The derived class must provide an implementation of actual storage/allocation of units of work, in whatever manner supports the execution model.

Declaration
protected abstract QueuedThreadBase<TAsynchronousHandlerProcessor, TAsynchronousArgument>.WorkInfo WorkInformation { get; }
Property Value
Type Description
QueuedThreadBase.WorkInfo<>

Methods

ScheduleNewWork()

Scheduling strategy method, provides the basic "queue and process in FIFO order" strategy

Declaration
protected override void ScheduleNewWork()
Overrides
SuperOffice.Threading.AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>.ScheduleNewWork()
Remarks

The queue actually used is an abstract property, that must be implemented by a derived class. This ducks the question of what kind of queue we're using, whether it is static by the calling thread, or whatever.

If no worker thread is currently running, one is created after the work has been queued.

Extension Methods

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