VsTaskLibraryHelper::Yield Method (IVsTaskSchedulerService^, VsTaskRunContext, IVsTaskCompletionSource^)

 

Yields the current operation on the thread. The rest of the asynchronous method will be scheduled as a continuation.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public:
[ExtensionAttribute]
static YieldAwaiter Yield(
	IVsTaskSchedulerService^ scheduler,
	VsTaskRunContext context = VsTaskRunContext::CurrentContext,
	IVsTaskCompletionSource^ taskCompletionSource = null
)

Parameters

scheduler
Type: Microsoft.VisualStudio.Shell.Interop::IVsTaskSchedulerService^

The instance of the task scheduler service.

context
Type: Microsoft.VisualStudio.Shell::VsTaskRunContext

The context to use for scheduling the rest of the asynchronous method.

taskCompletionSource
Type: Microsoft.VisualStudio.Shell.Interop::IVsTaskCompletionSource^

If a task completion source is passed in, the task created is added as a dependency.

Return Value

Type: Microsoft.Internal.VisualStudio.Shell::YieldAwaiter

An awaiter implementation to use with the await keyword.

Return to top
Show: