AwaitExtensions.SwitchTo(TaskScheduler, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an awaitable that schedules continuations on the specified scheduler.
public static Microsoft.VisualStudio.Threading.AwaitExtensions.TaskSchedulerAwaitable SwitchTo (this System.Threading.Tasks.TaskScheduler scheduler, bool alwaysYield = false);
static member SwitchTo : System.Threading.Tasks.TaskScheduler * bool -> Microsoft.VisualStudio.Threading.AwaitExtensions.TaskSchedulerAwaitable
<Extension()>
Public Function SwitchTo (scheduler As TaskScheduler, Optional alwaysYield As Boolean = false) As AwaitExtensions.TaskSchedulerAwaitable
Parameters
- scheduler
- TaskScheduler
The task scheduler used to execute continuations.
- alwaysYield
- Boolean
A value indicating whether the caller should yield even if already executing on the desired task scheduler.
Returns
An awaitable.