title: C++ new thread sleeps main thread
body: <p>Running the following code:</p>
  
  <pre><code>methodOne(){
      std::thread t(&amp;ChatBubble::runChatBubbleThread, this);
      t.join();
  }
  </code></pre>
  
  <p>runChatBubbleThread:</p>
  
  <pre><code>runChatBubbleThread(){
      // code here
      sleep(2000);
      // more code here    
  }
  </code></pre>
  
  <p>My understanding is that the new threat <code>t</code> is created, executes its code and then joins the main thread once it has completed, is there a reason <code>sleep()</code> is sleeping the main thread? </p>
  
  <p>Only thing I can think of is that <code>t.join</code> is waiting for the thread to complete before it continues on main thread, but then whats the point of threading if it has to wait!</p>