title: Make parent thread wait till child thread finishes in VC
body: <p>According to MSDN:</p>
  
  <p>The <code>WaitForSingleObject</code> function can wait for the following objects:</p>
  
  <pre><code>Change notification
  Console input
  Event
  Memory resource notification
  Mutex
  Process
  Semaphore
  Thread
  Waitable timer
  </code></pre>
  
  <p>Then we can use <code>WaitForSingleObject</code> to make the parent-thread wait for child ones.</p>
  
  <pre><code>int main()
  {
      HANDLE h_child_thread = CreateThread(0,0, child, 0,0,0); //create a thread in VC
  
      WaitForSingleObject(h_child_thread, INFINITE); //So, parent-thread will wait
  
      return 0;
  
  }
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <ol>
  <li><p>Is there any other way to make parent-thread wait for child ones in VC or Windows?</p></li>
  <li><p>I don't quite understand the usage of <code>WaitForSingleObject</code> here, does it mean that <strong>the thread's handle will be available when the thread terminates</strong>?</p></li>
  </ol>