Show / Hide Table of Contents

Class ThreadPerOperationBase<TAsynchronousHandlerProcessor, TAsynchronousArgument>

This class provides a thread-per-operation execution model, where (in principle) a new thread is spawned and immediately starts executing for each asynchronous operation. The number of threads is limited by configuration information, and callers will block once the limit is reached.

Inheritance
Object
AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument>
ThreadPerOperationBase<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 ThreadPerOperationBase<TAsynchronousHandlerProcessor, TAsynchronousArgument> : AsynchronousHandler<TAsynchronousHandlerProcessor, TAsynchronousArgument> where TAsynchronousHandlerProcessor : AsynchronousHandlerProcessor<TAsynchronousArgument>, new()
    where TAsynchronousArgument : class
Type Parameters
Name Description
TAsynchronousHandlerProcessor
TAsynchronousArgument

Constructors

ThreadPerOperationBase()

Constructor, only called from derived classes

Declaration
protected ThreadPerOperationBase()

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

Thread number limiting is a global responsibility, handled by the ThreadManager class. It will block if no thread slots are available.

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