Ticket #2739: 2739.patch
File 2739.patch, 1001 bytes (added by , 13 years ago) |
---|
-
thread.cpp
24 24 25 25 #include "timeconv.inl" 26 26 27 #include <cstdlib> 28 27 29 namespace boost 28 30 { 31 detail::thread_data_base* main_thread_data=0; 29 32 namespace detail 30 33 { 31 34 thread_data_base::~thread_data_base() … … 94 97 thread_info->self.reset(); 95 98 } 96 99 } 100 void main_tls_destructor(void) { 101 if (main_thread_data!=0) 102 tls_destructor(main_thread_data); 103 } 104 97 105 } 98 106 99 107 … … 169 177 detail::thread_data_base* const me(new externally_launched_thread()); 170 178 me->self.reset(me); 171 179 set_current_thread_data(me); 180 main_thread_data=me; 181 BOOST_VERIFY(!atexit(&detail::main_tls_destructor)); 182 172 183 return me; 173 184 } 174 185