共用方式為


JoinableTaskFactory.MainThreadAwaitable 結構

定義

可加速主執行緒非同步轉換的 awaitable 結構。

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
繼承
JoinableTaskFactory.MainThreadAwaitable
屬性

方法

GetAwaiter()

取得 awaiter。

NoThrowAwaitable()

針對指定的 SwitchToMainThreadAsync(CancellationToken) 作業傳回可等候的 ,如果要求取消,則不會擲回例外狀況。

適用於

執行緒安全性

此類型適用於所有成員的線程安全。