This topic has not yet been rated - Rate this topic

TaskScheduler.FromCurrentSynchronizationContext Method

April 12, 2014

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

Namespace:  System.Threading.Tasks
Assembly:  mscorlib (in mscorlib.dll)
public static TaskScheduler FromCurrentSynchronizationContext()
ExceptionCondition
InvalidOperationException

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.