title: Cancelling boost thread from another
body: <p>Is there a way to cancel a boost::thread from another as in the following?:</p>
  
  <pre><code>boost::thread* thread1(0);
  boost::thread* thread2(0);
  
  thread2 = new boost::thread([&amp;](){
     //some expensive computation that can't be modified
    if(thread1)
      thread1-&gt;interrupt();  
  });
  
  thread1 = new boost::thread([&amp;]() {
    //some other expensive computation that can't be modified
    if(thread2)
      thread2-&gt;interrupt();  
  });
  
  thread1-&gt;join();
  thread2-&gt;join();
  
  delete thread1;
  delete thread2;
  </code></pre>
  
  <p>Right now both expensive computations finish without being interrupted.  I had figured the joins would be treated as an interruption point, and the main thread would continue after one of the two expensive computations completed.</p>