ParallelOptions ParallelOptions ParallelOptions ParallelOptions Class


Stores options that configure the operation of methods on the Parallel class.

public ref class ParallelOptions
public class ParallelOptions
type ParallelOptions = class
Public Class ParallelOptions


By default, methods on the Parallel class attempt to use all available processors, are non-cancelable, and target the default TaskScheduler (TaskScheduler.Default). ParallelOptions enables overriding these defaults.


ParallelOptions() ParallelOptions() ParallelOptions() ParallelOptions()

Initializes a new instance of the ParallelOptions class.


CancellationToken CancellationToken CancellationToken CancellationToken

Gets or sets the CancellationToken associated with this ParallelOptions instance.

MaxDegreeOfParallelism MaxDegreeOfParallelism MaxDegreeOfParallelism MaxDegreeOfParallelism

Gets or sets the maximum number of concurrent tasks enabled by this ParallelOptions instance.

TaskScheduler TaskScheduler TaskScheduler TaskScheduler

Gets or sets the TaskScheduler associated with this ParallelOptions instance. Setting this property to null indicates that the current scheduler should be used.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

Thread Safety

The constructor is thread-safe and may be used by multiple threads concurrently to construct multiple instances. None of the other public members are thread-safe.

See also