Condividi tramite


JoinableTaskFactory.MainThreadAwaitable Struct

Definizione

Uno struct awaitable che consente una transizione asincrona al thread principale.

public: value class JoinableTaskFactory::MainThreadAwaitable
struct JoinableTaskFactory::MainThreadAwaitable
public struct JoinableTaskFactory.MainThreadAwaitable
[System.Runtime.CompilerServices.IsReadOnly]
public readonly struct JoinableTaskFactory.MainThreadAwaitable
type JoinableTaskFactory.MainThreadAwaitable = struct
[<System.Runtime.CompilerServices.IsReadOnly>]
type JoinableTaskFactory.MainThreadAwaitable = struct
Public Structure JoinableTaskFactory.MainThreadAwaitable
Ereditarietà
JoinableTaskFactory.MainThreadAwaitable
Attributi

Metodi

GetAwaiter()

Ottiene l'elemento awaiter.

NoThrowAwaitable()

Restituisce un oggetto in attesa per l'operazione specificata SwitchToMainThreadAsync(CancellationToken) che non genererà un'eccezione se viene richiesto l'annullamento.

Si applica a

Thread safety

Questo tipo è thread-safe per tutti i membri.