VsTaskContinuationOptions VsTaskContinuationOptions VsTaskContinuationOptions VsTaskContinuationOptions VsTaskContinuationOptions VsTaskContinuationOptions Enum

Definition

Managed definition of __VSTASKCONTINUATIONOPTIONS/__VSTASKCONTINUATIONOPTIONS2

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

public enum class VsTaskContinuationOptions
public enum class VsTaskContinuationOptions
enum VsTaskContinuationOptions
[System.Flags]
public enum VsTaskContinuationOptions
type VsTaskContinuationOptions = 
Public Enum VsTaskContinuationOptions
Inheritance
VsTaskContinuationOptionsVsTaskContinuationOptionsVsTaskContinuationOptionsVsTaskContinuationOptionsVsTaskContinuationOptionsVsTaskContinuationOptions
Attributes

Fields

AttachedToParent AttachedToParent AttachedToParent AttachedToParent AttachedToParent AttachedToParent 4

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

CancelWithParent CancelWithParent CancelWithParent CancelWithParent CancelWithParent CancelWithParent 536870912

Cancels the task when its parent is canceled.

Default Default Default Default Default Default 131072

The same as NotOnFaulted.

DenyChildAttach DenyChildAttach DenyChildAttach DenyChildAttach DenyChildAttach DenyChildAttach 8

An InvalidOperationException is thrown if an attempt is made to attach a child task to the created task.

ExecuteSynchronously ExecuteSynchronously ExecuteSynchronously ExecuteSynchronously ExecuteSynchronously ExecuteSynchronously 524288

This option is not supported by the VS task library and it will be ignored hence continuations will not be inlined.

IndependentlyCanceled IndependentlyCanceled IndependentlyCanceled IndependentlyCanceled IndependentlyCanceled IndependentlyCanceled 1073741824

Separates the continuation task's cancelation so that it can be canceled independently. So canceling the current task doesn't cancel the continuation task and it executes in the order it is scheduled.

LazyCancelation LazyCancelation LazyCancelation LazyCancelation LazyCancelation LazyCancelation 32

In the case of continuation cancellation, prevents completion of the continuation until the antecedent has completed.

LongRunning LongRunning LongRunning LongRunning LongRunning LongRunning 2

For background tasks, this will cause the task to run its own thread instead of thread pool

None None None None None None 0

Default = "Continue on any, no task options, run asynchronously" Specifies that the default behavior should be used. Continuations, by default, are scheduled when the antecedent task completes, regardless of the task's final state.

NotCancelable NotCancelable NotCancelable NotCancelable NotCancelable NotCancelable -2147483648

Marks the task as not cancelable. Users will get exception if they try to cancel the task

NotOnCanceled NotOnCanceled NotOnCanceled NotOnCanceled NotOnCanceled NotOnCanceled 262144

The continuation task should not be scheduled if its antecedent was canceled. This option is not valid for multi-task continuations.

NotOnFaulted NotOnFaulted NotOnFaulted NotOnFaulted NotOnFaulted NotOnFaulted 131072

The continuation task should not be scheduled if its antecedent threw an unhandled exception. This option is not valid for multi-task continuations.

NotOnRanToCompletion NotOnRanToCompletion NotOnRanToCompletion NotOnRanToCompletion NotOnRanToCompletion NotOnRanToCompletion 65536

The continuation task should not be scheduled if its antecedent ran to completion. This option is not valid for multi-task continuations.

OnlyOnFaulted OnlyOnFaulted OnlyOnFaulted OnlyOnFaulted OnlyOnFaulted OnlyOnFaulted 327680

The continuation task should be scheduled only if its antecedent threw an unhandled exception. This option is not valid for multi-task continuations.

OnlyOnRanToCompletion OnlyOnRanToCompletion OnlyOnRanToCompletion OnlyOnRanToCompletion OnlyOnRanToCompletion OnlyOnRanToCompletion 393216

The continuation task should be scheduled only if its antecedent ran to completion. This option is not valid for multi-task continuations.

PreferFairness PreferFairness PreferFairness PreferFairness PreferFairness PreferFairness 1

A hint to the task library to schedule a task in as fair a manner as possible, meaning that tasks scheduled sooner are more likely to be run sooner, and tasks scheduled later are more likely to be run later.

Applies to