Struct AwaitExtensions.TaskSchedulerAwaitable
- Namespace
- Microsoft.VisualStudio.Threading
- Assembly
- Microsoft.VisualStudio.Threading.dll
An awaitable that executes continuations on the specified task scheduler.
public readonly struct AwaitExtensions.TaskSchedulerAwaitable
- Inherited Members
Constructors
TaskSchedulerAwaitable(TaskScheduler, bool)
Initializes a new instance of the AwaitExtensions.TaskSchedulerAwaitable struct.
public TaskSchedulerAwaitable(TaskScheduler taskScheduler, bool alwaysYield = false)
Parameters
taskScheduler
TaskSchedulerThe task scheduler used to execute continuations.
alwaysYield
boolA value indicating whether the caller should yield even if already executing on the desired task scheduler.
Methods
GetAwaiter()
Gets an awaitable that schedules continuations on the specified scheduler.
public AwaitExtensions.TaskSchedulerAwaiter GetAwaiter()