System.Threading.Tasks.TaskCreationOptions Enumeration

Specifies flags that control optional behavior for the creation and execution of tasks.


public enum TaskCreationOptions


Documentation for this section has not yet been entered.


Member NameDescription

Specifies that a task is attached to a parent in the task hierarchy. For more information, see Nested Tasks and Child Tasks.


Specifies that an InvalidOperationException will be thrown if an attempt is made to attach a child task to the created task.


Prevents the ambient scheduler from being seen as the current scheduler in the created task. This means that operations like StartNew or ContinueWith that are performed in the created task will see TaskScheduler.Default as the current scheduler.


Specifies that a task will be a long-running, coarse-grained operation involving fewer, larger components than fine-grained systems. It provides a hint to the System.Threading.Tasks.TaskScheduler that oversubscription may be warranted. Oversubscription lets you create more threads than the available number of hardware threads.


Specifies that the default behavior should be used.


A hint to a System.Threading.Tasks.TaskScheduler to schedule a task in as fair a manner as possible, meaning that tasks scheduled sooner will be more likely to be run sooner, and tasks scheduled later will be more likely to be run later.


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