Specifies the options for creating a task.
此枚举有一个 FlagsAttribute 特性,通过该特性可使其成员值按位组合。
命名空间: Microsoft.VisualStudio.Shell
程序集: Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)
语法
声明
<FlagsAttribute> _
Public Enumeration VsTaskCreationOptions
[FlagsAttribute]
public enum VsTaskCreationOptions
成员
成员名称 | 说明 | |
---|---|---|
None | The default behavior should be used. | |
PreferFairness | 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 | 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. | |
AttachedToParent | 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. | |
DenyChildAttach | A child task cannot be attached to the task. | |
NotCancelable | The task cannot be canceled. Users will get an exception if they try to cancel the task. |