ConcurrentExclusiveSchedulerPair Class

.NET Framework (current version)
 

Provides task schedulers that coordinate to execute tasks while ensuring that concurrent tasks may run concurrently and exclusive tasks never do.

Namespace:   System.Threading.Tasks
Assembly:  mscorlib (in mscorlib.dll)

System::Object
  System.Threading.Tasks::ConcurrentExclusiveSchedulerPair

[HostProtectionAttribute(SecurityAction::LinkDemand, Synchronization = true, 
	ExternalThreading = true)]
public ref class ConcurrentExclusiveSchedulerPair 

NameDescription
System_CAPS_pubmethodConcurrentExclusiveSchedulerPair()

Initializes a new instance of the ConcurrentExclusiveSchedulerPair class.

System_CAPS_pubmethodConcurrentExclusiveSchedulerPair(TaskScheduler^)

Initializes a new instance of the ConcurrentExclusiveSchedulerPair class that targets the specified scheduler.

System_CAPS_pubmethodConcurrentExclusiveSchedulerPair(TaskScheduler^, Int32)

Initializes a new instance of the ConcurrentExclusiveSchedulerPair class that targets the specified scheduler with a maximum concurrency level.

System_CAPS_pubmethodConcurrentExclusiveSchedulerPair(TaskScheduler^, Int32, Int32)

Initializes a new instance of the ConcurrentExclusiveSchedulerPair class that targets the specified scheduler with a maximum concurrency level and a maximum number of scheduled tasks that may be processed as a unit.

NameDescription
System_CAPS_pubpropertyCompletion

Gets a Task that will complete when the scheduler has completed processing.

System_CAPS_pubpropertyConcurrentScheduler

Gets a TaskScheduler that can be used to schedule tasks to this pair that may run concurrently with other tasks on this pair.

System_CAPS_pubpropertyExclusiveScheduler

Gets a TaskScheduler that can be used to schedule tasks to this pair that must run exclusively with regards to other tasks on this pair.

NameDescription
System_CAPS_pubmethodComplete()

Informs the scheduler pair that it should not accept any more tasks.

System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The following example shows the use of the ConcurrentExclusiveSchedulerPair class. Readers run on the concurrent part of the scheduler. The writer runs on the exclusive part of the scheduler. This code example is part of a larger example provided for the How to: Specify a Task Scheduler in a Dataflow Block topic.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1

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
Show: