title: Parallel.ForEach: How to block the main thread until all the parallel task finished
body: <p>In the following scenario: can we block the main thread to begin to perform step 3 until step 2 finished?<br>
  I'm talking about C#</p>
  
  <pre><code>//step 1: some tasks
  /*
  */
  
  //step 2: perform some sub tasks in parallel.
  Parallel.ForEach(X, x =&gt; Foo(x));
  
  //step 3: Some other task
  //Can we begin to perform step 3 until all sub tasks in step 2 finished???
  </code></pre>