Boost logo

Boost :

From: Valentin Samko (boost_at_[hidden])
Date: 2007-06-17 14:54:58

I noticed that if I use boost::thread_specific_ptr (thread local storage) and terminate my console application
(on windows) with Ctrl+Break, I always get a message box and assertion error from the boost thread library:
    Assertion failed: attached_thread_count == 0, file .......\msvc71\libs\thread\build\..\src\tss_hooks.cpp, line 131
Is this a known problem and are there any fixes?
The test case is
        #include <boost/thread/tss.hpp>
        #include <iostream>
        #include <windows.h>

        int main()
            boost::thread_specific_ptr<int> tl_int;
            tl_int.reset(new int);
            std::cout << "Sleeping for 10 seconds ..." << std::endl ;
            std::cout << "Woke up" << std::endl ;

compiled with /DBOOST_THREAD_USE_DLL . If you press Ctrl+Break while
it's sleeping you get that assertion.


Boost list run by bdawes at, gregod at, cpdaniel at, john at