title: boost::this_thread::sleep_for() put all my threads to sleep
body: <pre><code>void WINEvents::loop()
  {
      while (true)
      {
          boost::this_thread::sleep_for(boost::chrono::milliseconds(500));
  
          //boost::this_thread::sleep(boost::posix_time::milliseconds(500));
  
          /*boost::mutex                   mutex;
          boost::condition_variable_any    condition;
          boost::unique_lock&lt;boost::mutex&gt; lock(mutex);
          condition.wait_for(lock, boost::chrono::milliseconds(500));*/
      }
  }
  
  void SDLplateforme::execute()
  {
      WINEvents winEvents;
      boost::thread newThread(WINEvents::loop, &amp;winEvents);
  
      while (true)
      {
          #####EDIT:
          auto time = Int2String(_timer-&gt;getTicks());
          SDL_SetWindowTitle(_window, time.c_str());
      }
  }
  
  int main(int argc, char *argv[])
  {
      auto plateforme = make_shared&lt;SDLplateforme&gt;();
  
      boost::thread mainThread(SDLplateforme::execute, plateforme);
      mainThread.join();
  
      return 0;
  }
  </code></pre>
  
  <p>I creates two threads:</p>
  
  <ul>
  <li><p><code>SDLplateforme::execute()</code> -> constantly displaying timer value in the window frame</p></li>
  <li><p><code>WINEvents::loop()</code> -> is put to sleep using <code>boost::this_thread::sleep</code></p></li>
  </ul>
  
  <p>But, it appears the sleep call in <code>WINEvents::loop()</code> also make the other thread asleep, since the text is displayed with interval equal to the sleep parameter (here 500ms), whereas it is supposed to be updated every frame.</p>
  
  <p>Is <code>boost::this_thread::sleep()</code> supposed to sleep only the current thread?
  If yes, what do I do wrong? If no, how do I achieve that?</p>