title: Closing a thread handle before exiting the associated thread
body: <p>This is what I am trying to do in my code:
  I create an event, create a thread. If something fails in the main thread, I set the event to indicate the associated thread about the failure and instruct it to gracefully exit the associated thread.</p>
  
  <p>My question is, is it safe to close the thread handle, right after the event is set, while the associated thread is still running (trying to clean up and exit)? The intention in trying to close the thread handle immediately and not waiting for the associated thread to return is to avoid stalling others waiting on the main thread until the associated thread returns.</p>
  
  <p>Pleases suggest. Thanks.</p>