JoinableTaskFactory.MainThreadAwaiter Struct

Definition

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

C++
public: value class JoinableTaskFactory::MainThreadAwaiter : System::Runtime::CompilerServices::INotifyCompletion
C++
public: value class JoinableTaskFactory::MainThreadAwaiter : System::Runtime::CompilerServices::ICriticalNotifyCompletion
Inheritance
JoinableTaskFactory.MainThreadAwaiter
Attributes
Implements

Properties

IsCompleted

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

Methods

GetResult()

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

OnCompleted(Action)

Schedules a continuation for execution on the Main thread.

UnsafeOnCompleted(Action)

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

Applies to

Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022

Thread Safety

This type is thread-safe for all members.