title: TaskScheduler.Current and TaskScheduler.FromCurrentSynchronizationContext() difference?
body: <p>I have a task to get products from database, and the <code>ContinueWith</code> action that operate some UI modification, therefore I had a problem because the Task create a new thread, and the UI modification was executed not in the UI Thread.</p>
  
  <p>I tried to use this fix : </p>
  
  <pre><code>var currentScheduler = TaskScheduler.Current;
  
  Task.Factory.StartNew(() =&gt;
  {    
      // get products   
  }).ContinueWith((x) =&gt; handleProductsArrived(x.Result, x.Exception), currentScheduler);
  </code></pre>
  
  <p>but it didn't work at all. I check and the <code>ContinueWith</code> was not executed in the thread from currentScheduler but in an another.</p>
  
  <p>I discovered this method :</p>
  
  <pre><code>Task.Factory.StartNew(() =&gt;
  {
      // get products
  }).ContinueWith((x) =&gt; handleProductsArrived(x.Result, x.Exception), TaskScheduler.FromCurrentSynchronizationContext());
  </code></pre>
  
  <p>and it works. So what's the differences? Why didn't my first code work?
  Thanks!</p>