VsTaskCreationOptions VsTaskCreationOptions VsTaskCreationOptions VsTaskCreationOptions VsTaskCreationOptions VsTaskCreationOptions Enum

Definition

Specifies the options for creating a task.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

public enum class VsTaskCreationOptions
public enum class VsTaskCreationOptions
enum VsTaskCreationOptions
[System.Flags]
public enum VsTaskCreationOptions
type VsTaskCreationOptions = 
Public Enum VsTaskCreationOptions
Inheritance
VsTaskCreationOptionsVsTaskCreationOptionsVsTaskCreationOptionsVsTaskCreationOptionsVsTaskCreationOptionsVsTaskCreationOptions
Attributes

Fields

AttachedToParent AttachedToParent AttachedToParent AttachedToParent AttachedToParent AttachedToParent 4

Creates the task as attached to the currently-running task. The parent task is not marked as completed until this child task is completed as well.

CancelWithParent CancelWithParent CancelWithParent CancelWithParent CancelWithParent CancelWithParent 536870912
DenyChildAttach DenyChildAttach DenyChildAttach DenyChildAttach DenyChildAttach DenyChildAttach 8

A child task cannot be attached to the task.

LongRunning LongRunning LongRunning LongRunning LongRunning LongRunning 2

The task will be a long-running, coarse-grained operation. It provides a hint to the TaskScheduler that oversubscription may be warranted. For background tasks, this member causes the task to run its own thread instead of the thread pool.

None None None None None None 0

The default behavior should be used.

NotCancelable NotCancelable NotCancelable NotCancelable NotCancelable NotCancelable -2147483648

The task cannot be canceled. Users will get an exception if they try to cancel the task.

PreferFairness PreferFairness PreferFairness PreferFairness PreferFairness PreferFairness 1

A hint to a 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.

Applies to