C# Class CqlSharp.Threading.IOTaskScheduler

Provides a task scheduler that targets the I/O ThreadPool.
Based on the IOTaskScheduler as provided here: http://code.msdn.microsoft.com/Samples-for-Parallel-b4b76364/sourcecode?fileId=44488&pathId=1257700934
Inheritance: System.Threading.Tasks.TaskScheduler, IDisposable
Exibir arquivo Open project: reuzel/CqlSharp Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Disposes of resources used by the scheduler.

IOTaskScheduler ( ) : System

Initializes a new instance of the IOTaskScheduler class.

Protected Methods

Method Description
GetScheduledTasks ( ) : IEnumerable

Gets an enumerable of tasks queued to the scheduler.

This implementation will always return an empty enumerable.

QueueTask ( Task task ) : void

Queues a task to the scheduler for execution on the I/O ThreadPool.

TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool

Executes a task on the current thread.

Private Methods

Method Description
GetOrCreateWorkItem ( ) : System.Threading.WorkItem

Gets or create a work item.

Method Details

Dispose() public method

Disposes of resources used by the scheduler.
public Dispose ( ) : void
return void

GetScheduledTasks() protected method

Gets an enumerable of tasks queued to the scheduler.
This implementation will always return an empty enumerable.
protected GetScheduledTasks ( ) : IEnumerable
return IEnumerable

IOTaskScheduler() public method

Initializes a new instance of the IOTaskScheduler class.
public IOTaskScheduler ( ) : System
return System

QueueTask() protected method

Queues a task to the scheduler for execution on the I/O ThreadPool.
protected QueueTask ( Task task ) : void
task Task The Task to queue.
return void

TryExecuteTaskInline() protected method

Executes a task on the current thread.
protected TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool
task Task The task to be executed.
taskWasPreviouslyQueued bool Ignored.
return bool