title: Embedded Boost::Python and C++ : run in parallel
body: <p>How do I run C++ and Boost::Python code in parallel without problems?</p>
  
  <p>Eg in my game I'd want to execute Python code in parallel with C++ code; if the embedded Python interpreter's code executes a blocking loop, like <code>while(True): pass</code>, the C++ code would still be running and processing frames to render with its own loop.</p>
  
  <p>I tried with <code>boost::thread</code> and <code>std::thread</code> but unless I joined these threads with the main thread the program would crash...</p>
  
  <p>Any suggestions or examples?</p>