title: How to get a Task that uses SynchronizationContext? And how are SynchronizationContext used anyway?
body: <p>I am still learning the whole Task-concept and TPL. From my current understanding, the SynchronizationContext functions (if present) are used by <code>await</code> to dispatch the Task "somewhere". On the other hand, the functions in the <code>Task</code> class do not use the context, right?</p>
  
  <p>So for example <code>Task.Run(...)</code> will always dispatch the action on an worker thread of the thread pool and ignore the <code>SynchronizationContext.Current</code> completely. <code>await Foobar()</code> would use the context to execute the generated task after the <code>await</code>?</p>
  
  <p>If that is true, my question is: How can I obtain a <code>Task</code>, that actually runs an action but is dispatched using <code>SynchronizationContext.Current.Send/Post</code> ?</p>
  
  <p>And can anyone recommend a good introduction into <code>SynchronizationContext</code>, especially when and how they are used by the rest of the framework? The <a href="http://msdn.microsoft.com/en-us/library/system.threading.synchronizationcontext.aspx" rel="noreferrer">MSDN</a> seems to be very quiet about the class. The top Google hits (<a href="http://www.codeproject.com/Articles/14265/The-NET-Framework-s-New-SynchronizationContext-Cla" rel="noreferrer">here</a> and <a href="http://www.codeproject.com/Articles/31971/Understanding-SynchronizationContext-Part-I" rel="noreferrer">here</a>) seem to be tailored to Windows Forms dispatching only. Stephen Cleary wrote <a href="http://msdn.microsoft.com/en-us/magazine/gg598924.aspx" rel="noreferrer">an article</a> which is nice to learn what contexts already exist and how they work, but I lack understanding of where and when they are actually used.</p>