InOrderThreadPoolQueue Class

 

Represents work items that are run serially on threadpool threads.

Namespace:   Microsoft.WindowsServerSolutions.Common.ProviderFramework
Assembly:  ProviderFramework (in ProviderFramework.dll)

System::Object
  Microsoft.WindowsServerSolutions.Common.ProviderFramework::InOrderThreadPoolQueue

public ref class InOrderThreadPoolQueue sealed : IDisposable

NameDescription
System_CAPS_pubmethodInOrderThreadPoolQueue()

Initializes a new instance of the InOrderThreadPoolQueue class.

System_CAPS_pubmethodInOrderThreadPoolQueue(Action<Action^>^)

Initializes a new instance of the InOrderThreadPoolQueue class.

NameDescription
System_CAPS_pubmethodDispose()

Releases all resources use by the InOrderThreadPoolQueue object.

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodQueueAction(Action^)

Queues a work item to the InOrderThreadPoolQueue.

System_CAPS_pubmethodQueueHighPriorityAction(Action^)

Queues a work item to the InOrderThreadPoolQueue at high priority.

System_CAPS_pubmethodToString()

(Inherited from Object.)

You should use this class instead of ThreadPool.QueueUserWorkItem directly because the work items that you enqueue to an instance of InOrderThreadPoolQueue are run in the order that they were queued. This is useful if you want to use the ThreadPool to work asynchronously, but order is important. For example, if you queue two work items, A and B, work item B will not start until work item A has finished.

Disposing of an InOrderThreadPoolQueue object cancels any work items that have not run, but a work item that has already started cannot be stopped.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top

Community Additions

ADD
Show: