title: how to join thread if joinable do nothing otherwise?
body: <p>I'm using <code>boost::thread join</code> method to wait until thread is finished. But if I try to <code>join</code> the thread when it already finished I receive an exception. So how can I:</p>
  
  <p>Join thread if active and do nothing if not active?</p>