title: Windows Threading Wait Method
body: <p>I'm creating a thread class to encapsulate the windows thread methods. I'm trying to create a method that makes the application wait for the thread to complete before it exits the application. If I use a while loop and boolean flag, it works but obviously it spikes my CPU use and it's just not ideal.</p>
  
  <p>What ways would you use to wait for the completion of a thread? I'm not really looking for code here, just areas to look into.</p>