From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2007-03-05 07:13:29
I don't know if this is a known bug or not:
When using thread_specific_ptr's, if at any time later in the program the
total tss data items drops to zero, it is no longer possible to use tss
using namespace boost;
int test_main(int, char*)
BOOST_FAIL("Can't use TSS any longer after initial usage dropped to
The above program fails when using Boost from the RC_1_34_0 branch + msvc
8.0 under XP SP2 (my copy of the 1.34 branch is not very recent - from
January this year). Haven't tried other combinations.
The actual problem seems to be related to tss deinit based on reference
counting and init based on once_init, IIUC.