title: How to get std::thread of current thread?
body: <p>How can I get a <code>std::thread</code> object representing current (already running thread).</p>
  
  <p>I know I can do <code>std::this_thread::get_id()</code>. However, this will give me a <code>std::thread:id</code> object.</p>
  
  <p>My main goal is to allow some other thread to join current one. However, the problem is that current one wasn't started by creation of std::thread, so I couldn't have saved it beforehand.</p>