C# Class GSF.Threading.ManagedThreadPool

Defines a managed thread pool
This class works like the normal thread pool but provides the benefit of automatic tracking of queued threads through the ManagedThreads collection, returns a reference to the queued thread with the ability to dequeue and/or abort, total thread runtime and the ability to run the queued thread in an alternate execution context
Exibir arquivo Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
QueueUserWorkItem ( ContextCallback callback, ExecutionContext ctx ) : GSF.Threading.ManagedThread

Queues a work item for processing on the managed thread pool

This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.

QueueUserWorkItem ( ContextCallback callback, object state, ExecutionContext ctx ) : GSF.Threading.ManagedThread

Queues a work item for processing on the managed thread pool

This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.

QueueUserWorkItem ( ParameterizedThreadStart callback ) : GSF.Threading.ManagedThread

Queues a work item for processing on the managed thread pool

This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.

QueueUserWorkItem ( ParameterizedThreadStart callback, object state ) : GSF.Threading.ManagedThread

Queues a work item for processing on the managed thread pool

This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.

QueueUserWorkItem ( ThreadStart callback ) : GSF.Threading.ManagedThread

Queues a work item for processing on the managed thread pool

This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.

Private Methods

Method Description
HandleItem ( object state ) : void

Method Details

QueueUserWorkItem() public static method

Queues a work item for processing on the managed thread pool
This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.
public static QueueUserWorkItem ( ContextCallback callback, ExecutionContext ctx ) : GSF.Threading.ManagedThread
callback ContextCallback A WaitCallback representing the method to execute.
ctx System.Threading.ExecutionContext Alternate execution context in which to run the thread.
return GSF.Threading.ManagedThread

QueueUserWorkItem() public static method

Queues a work item for processing on the managed thread pool
This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.
public static QueueUserWorkItem ( ContextCallback callback, object state, ExecutionContext ctx ) : GSF.Threading.ManagedThread
callback ContextCallback A WaitCallback representing the method to execute.
state object An object containing data to be used by the method.
ctx System.Threading.ExecutionContext Alternate execution context in which to run the thread.
return GSF.Threading.ManagedThread

QueueUserWorkItem() public static method

Queues a work item for processing on the managed thread pool
This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.
public static QueueUserWorkItem ( ParameterizedThreadStart callback ) : GSF.Threading.ManagedThread
callback ParameterizedThreadStart A WaitCallback representing the method to execute.
return GSF.Threading.ManagedThread

QueueUserWorkItem() public static method

Queues a work item for processing on the managed thread pool
This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.
public static QueueUserWorkItem ( ParameterizedThreadStart callback, object state ) : GSF.Threading.ManagedThread
callback ParameterizedThreadStart A WaitCallback representing the method to execute.
state object An object containing data to be used by the method.
return GSF.Threading.ManagedThread

QueueUserWorkItem() public static method

Queues a work item for processing on the managed thread pool
This differs from the normal thread pool QueueUserWorkItem function in that it does not return a success value determing if item was queued, but rather a reference to to the managed thread that was actually placed on the queue.
public static QueueUserWorkItem ( ThreadStart callback ) : GSF.Threading.ManagedThread
callback ThreadStart A WaitCallback representing the method to execute.
return GSF.Threading.ManagedThread