ConcurrencyLimiter Class

Task scheduler that limits the number of tasks that can execute in parallel at any given time.

Definition

Namespace: Gemstone.Threading
Assembly: Gemstone.Threading (in Gemstone.Threading.dll) Version: 1.0.128 -- Release Build+d4a9a653be1def5888b9be91bb1825c8655f3529
public class ConcurrencyLimiter : TaskScheduler
Inheritance
Object    TaskScheduler    ConcurrencyLimiter

Constructors

ConcurrencyLimiter Creates a new instance of the ConcurrencyLimiter class with a ShortSynchronizedOperation and a maximum concurrency level equal to the number of processors on the current machine.
ConcurrencyLimiter(Int32) Creates a new instance of the ConcurrencyLimiter class with a ShortSynchronizedOperation.
ConcurrencyLimiter(SynchronizedOperationFactory) Creates a new instance of the ConcurrencyLimiter class with a maximum concurrency level equal to the number of processors on the current machine.
ConcurrencyLimiter(SynchronizedOperationFactory, Int32) Creates a new instance of the ConcurrencyLimiter class.

Properties

CurrentConcurrencyLevel Gets the number of threads that are currently executing tasks concurrently.
IdGets the unique ID for this TaskScheduler.
(Inherited from TaskScheduler)
MaximumConcurrencyLevel Gets the maximum number of threads that can be executing tasks concurrently.
(Overrides TaskSchedulerMaximumConcurrencyLevel)

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetScheduledTasks For debugger support only, generates an enumerable of Task instances currently queued to the scheduler waiting to be executed.
(Overrides TaskSchedulerGetScheduledTasks)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
QueueTask Queues a Task to the scheduler.
(Overrides TaskSchedulerQueueTask(Task))
SetMaximumConcurrencyLevel Sets the maximum number of threads that can be executing tasks concurrently.
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryDequeueAttempts to dequeue a Task that was previously queued to this scheduler.
(Inherited from TaskScheduler)
TryExecuteTaskAttempts to execute the provided Task on this scheduler.
(Inherited from TaskScheduler)
TryExecuteTaskInline Determines whether the provided Task can be executed synchronously in this call, and if it can, executes it.
(Overrides TaskSchedulerTryExecuteTaskInline(Task, Boolean))

See Also