AwaitExtensions::SwitchTo Method (TaskScheduler^, Boolean)

 

Gets an awaitable that schedules continuations on the specified scheduler.

Namespace:   Microsoft.VisualStudio.Threading
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 to top
Show: