FromCurrentSynchronizationContext Method
Collapse the table of content
Expand the table of content

TaskScheduler.FromCurrentSynchronizationContext Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Creates a TaskScheduler associated with the current System.Threading.SynchronizationContext.

Namespace:  System.Threading.Tasks
Assembly:  mscorlib (in mscorlib.dll)

public static TaskScheduler FromCurrentSynchronizationContext()


The current SynchronizationContext may not be used as a TaskScheduler.

All Task instances queued to the returned scheduler will be executed through a call to the Post method on that context.

For more information, see [638f8ea5-21db-47a2-a934-86e1e961bf65].

Windows Phone OS

Supported in: 8.1, 8.0

© 2016 Microsoft