C# Class Jellyfish.Commands.BulkheadTaskScheduler

Inheritance: System.Threading.Tasks.TaskScheduler, IDisposable
Mostra file Open project: Zenasoft/Jellyfish.Commands Class Usage Examples

Public Methods

Method Description
BulkheadTaskScheduler ( int threadCount, string threadName ) : System

Initializes the scheduler.

Dispose ( ) : void

Initiates shutdown of the scheduler.

Protected Methods

Method Description
GetScheduledTasks ( ) : IEnumerable

Gets the tasks scheduled to this scheduler.

This does not include the tasks on sub-schedulers. Those will be retrieved by the debugger separately.

QueueTask ( Task task ) : void

Queues a task to the scheduler.

TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool

Tries to execute a task synchronously on the current thread.

Private Methods

Method Description
ThreadBasedDispatchLoop ( ) : void

The dispatch loop run by all threads in this scheduler.

Method Details

BulkheadTaskScheduler() public method

Initializes the scheduler.
public BulkheadTaskScheduler ( int threadCount, string threadName ) : System
threadCount int The number of threads to create and use for processing work items.
threadName string The name to use for each of the created threads.
return System

Dispose() public method

Initiates shutdown of the scheduler.
public Dispose ( ) : void
return void

GetScheduledTasks() protected method

Gets the tasks scheduled to this scheduler.
This does not include the tasks on sub-schedulers. Those will be retrieved by the debugger separately.
protected GetScheduledTasks ( ) : IEnumerable
return IEnumerable

QueueTask() protected method

Queues a task to the scheduler.
protected QueueTask ( Task task ) : void
task Task The task to be queued.
return void

TryExecuteTaskInline() protected method

Tries to execute a task synchronously on the current thread.
protected TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool
task Task The task to execute.
taskWasPreviouslyQueued bool Whether the task was previously queued.
return bool