title: share_ptr of boost::thread assertion fail
body: <pre><code>class WIFITest
  {
  public:
  
    void StartTest();
  
    void Notify_Test(boost::shared_ptr&lt;basic_msg&gt; basic_msg, ID id );
  
  
  private:
    void OpenStaMode_test();
  
  private: 
    boost::shared_ptr&lt;boost::thread&gt; OpenStaMode_testThread;
  
    boost::shared_ptr&lt;basic_msg&gt; VMF_WIFI_NOTIFY_CLIENT_OPEN_MSG;  
  
    typedef boost::shared_ptr&lt;boost::thread&gt; THREAD;
    typedef boost::shared_ptr&lt;basic_msg&gt; MSG;
    std::map&lt;ID,std::pair&lt;THREAD,MSG&gt;&gt; map;
  };  
  
  void WIFITest::StartTest()
  { 
    map[ID::WIFI_REQ_CLIENT_OPEN] = std::make_pair(OpenStaMode_testThread,VMF_WIFI_NOTIFY_CLIENT_OPEN_MSG);
  
    this-&gt;OpenStaMode_testThread.reset(new boost::thread(&amp;WIFITest::OpenStaMode_test,this));
    this-&gt;OpenStaMode_testThread-&gt;join();
  
  }
  void WIFITest::OpenStaMode_test()
  {
    unsigned char strData[WIFI_SEND_BUF_SIZE_MIN];
    sendOpenReq(strData);
    try { 
      boost::this_thread::sleep(boost::posix_time::seconds(8));
    }
    catch(const boost::thread_interrupted&amp;) {   
  
          std::cout&lt;&lt;"OpenStaMode_test success@ \n";
  
        }
      else {
          goto OpenStaMode_test_fail;
        }
  
      return;
  
    }
  OpenStaMode_test_fail:
    printf("@WIFITest::OpenStaMode_test FAIL@@@@@@@@@@@@@@ \n");
  
  }
  
  void WIFITest::Notify_Test(boost::shared_ptr&lt;basic_msg&gt; basic_msg, ID id)
  {
    map[id].second = basic_msg;
  
     map[id].first-&gt;interrupt();
    printf("@WIFITest::INTERRUPTED @@@@@@@@@@@@@@ \n");
  
  }
  </code></pre>
  
  <p>First  main will create StartTest instance and call  StartTest(),
  When other code call Notify_Test, "map[id].first->interrupt();" this sentence will produce following assertion fail, and crash the program. </p>
  
  <p>TestWIFI: ../../boost_1_55_0/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access::type boost::shared_ptr::operator->() const [with T = boost::thread, typename boost::detail::sp_member_access::type = boost::thread*]: Assertion `px != 0' failed.</p>