title: Wait for IProgress Report Method to Return
body: <p>I am updating my UI via <code>IProgress</code> and the <code>Report</code> method. I do something like </p>
  
  <pre><code>IProgress&lt;ProgressInfo&gt; p = new Progress&lt;ProgressInfo&gt;(ReportProgress);
  Task task = Task.Factory.StartNew(() =&gt;
  {
      result = Execute(p);
  });
  </code></pre>
  
  <p>where in the <code>Execute</code> method I report progress via</p>
  
  <pre><code>p.Report(someObject);
  </code></pre>
  
  <p>Now, the issue is, in the last case where I report progress to the UI, I write something to a console window, which I use when the task has returned. The problem is that because <code>IProgress</code> is async, the task returns when the last progress report has not finished, leaving me without data. </p>
  
  <p>I clearly could put the thread to sleep or spinwait, but this seems nasty to me as, although the report process will take a very short amount of time, I don't know the actual value to sleep etc. I have looked at using <code>AutoResetEvent</code> but again I am not sure this is the cleanest solution. </p>
  
  <p>My question is how can I force the thread to wait for the return of the <code>p.Report(someObject)</code> call in the "cleanest" way possible, that is without relying on guessing at the time the report progress will take to return?</p>