次の方法で共有


VsTaskCreationOptions Enum

Definition

Managed definition of __VSTASKCREATIONOPTIONS/__VSTASKCREATIONOPTIONS2.

This enumeration supports a bitwise combination of its member values.

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

Fields

Name Value Description
NotCancelable -2147483648

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

None 0

The default behavior should be used.

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.

LongRunning 2

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

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.

DenyChildAttach 8

A child task cannot be attached to the task.

CancelWithParent 536870912

Cancels the task when its parent is canceled.

Applies to