title: Task.wait and continueWIth
body: <p>I am having a task like below.</p>
  
  <pre><code>var task = Task&lt;string&gt;.Factory.StartNew(() =&gt; longrunningmethod()
      .ContinueWith(a =&gt;
               longrunningmethodcompleted((Task&lt;string&gt;)a,
                    TaskScheduler.FromCurrentSynchronizationContext())));
  
  task.Wait();
  </code></pre>
  
  <p>My task will call the longrunningmethod and after completing it will call completed method.
  Inside my longrunningmethod I am delaying by <code>Thread.Sleep(30000)</code>. When I use Task.wait system hangs and it's not calling longrunningmethodcompleted method. If I don't use Task.wait everything flows good.</p>