AwaitExtensions::SwitchTo Method (TaskScheduler^, Boolean)
Visual Studio 2015
Gets an awaitable that schedules continuations on the specified scheduler.
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
public: [ExtensionAttribute] static AwaitExtensions::TaskSchedulerAwaitable SwitchTo( TaskScheduler^ scheduler, bool alwaysYield = false )
Parameters
- scheduler
-
Type:
System.Threading.Tasks::TaskScheduler^
The task scheduler used to execute continuations.
- alwaysYield
-
Type:
System::Boolean
A value indicating whether the caller should yield even if already executing on the desired task scheduler.
Return Value
Type: Microsoft.VisualStudio.Threading::AwaitExtensions::TaskSchedulerAwaitable
Show: