#if NET20 || NET30 || NET35 || !NET_4_6 namespace System.Threading.Tasks { [Flags] [Serializable] public enum TaskCreationOptions { /// /// Specifies that the default behavior should be used. /// None = 0x0, /// /// 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. /// PreferFairness = 0x01, /// /// Specifies that a task will be a long-running, course-grained operation. It provides a hint to the /// TaskScheduler that oversubscription may be /// warranted. /// LongRunning = 0x02, /// /// Specifies that a task is attached to a parent in the task hierarchy. /// AttachedToParent = 0x04, /// /// Specifies that an InvalidOperationException will be thrown if an attempt is made to attach a child task to the created task. /// DenyChildAttach = 0x08, /// /// 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. /// HideScheduler = 0x10, // 0x20 is already being used in TaskContinuationOptions /// /// Forces continuations added to the current task to be executed asynchronously. /// This option has precedence over TaskContinuationOptions.ExecuteSynchronously /// RunContinuationsAsynchronously = 0x40 } } #endif