title: Wake up a std::thread from usleep
body: <p>Consider the following example:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;unistd.h&gt;
  
  #include &lt;signal.h&gt;
  #include &lt;thread&gt;
  
  void sleepy() {
      usleep(1.0E15);
  }
  
  int main() {
      std :: thread sleepy_thread(sleepy);
  
      // Wake it up somehow...?
  
      sleepy_thread.join();
  }
  </code></pre>
  
  <p>Here we have a thread that just sleeps forever. I want to join it, without having to wait forever for it to spontaneously wake from usleep. Is there a way to tell it from the extern "hey man, wake up!", so that I can join it in a reasonable amount of time? </p>
  
  <p>I am definitely not an expert on threads, so if possible don't assume anything.</p>