Table of Contents

Struct JoinableTaskFactory.MainThreadAwaiter

Namespace
Microsoft.VisualStudio.Threading
Assembly
Microsoft.VisualStudio.Threading.dll

An awaiter struct that facilitates an asynchronous transition to the Main thread.

public readonly struct JoinableTaskFactory.MainThreadAwaiter : ICriticalNotifyCompletion, INotifyCompletion
Implements
Inherited Members

Properties

IsCompleted

Gets a value indicating whether the caller is already on the Main thread.

public bool IsCompleted { get; }

Property Value

bool

Methods

GetResult()

Called on the Main thread to prepare it to execute the continuation.

public void GetResult()

OnCompleted(Action)

Schedules a continuation for execution on the Main thread.

public void OnCompleted(Action continuation)

Parameters

continuation Action

The action to invoke when the operation completes.

UnsafeOnCompleted(Action)

Schedules a continuation for execution on the Main thread without capturing the ExecutionContext.

public void UnsafeOnCompleted(Action continuation)

Parameters

continuation Action

The action to invoke when the operation completes.