TaskScheduler.FromCurrentSynchronizationContext メソッド

定義

現在の SynchronizationContext に関連付けられている TaskScheduler を作成します。

public:
 static System::Threading::Tasks::TaskScheduler ^ FromCurrentSynchronizationContext();
public static System.Threading.Tasks.TaskScheduler FromCurrentSynchronizationContext ();
static member FromCurrentSynchronizationContext : unit -> System.Threading.Tasks.TaskScheduler
Public Shared Function FromCurrentSynchronizationContext () As TaskScheduler

戻り値

TaskScheduler

Currentによる判断として、現在の SynchronizationContext に関連付けられている TaskScheduler

例外

現在の SynchronizationContext を TaskScheduler として使用することはできません。

注釈

返されたスケジューラにキューに登録されているすべての Task インスタンスは、そのコンテキストでメソッドを Post 呼び出して実行されます。

詳細については、「TaskScheduler」を参照してください。

適用対象

こちらもご覧ください