Ticket #1929: thread-borland-workaround.patch
File thread-borland-workaround.patch, 1.6 KB (added by , 14 years ago) |
---|
-
boost/thread/win32/thread.hpp
214 214 } 215 215 #else 216 216 template<typename F> 217 static inline detail::thread_data_ ptrmake_thread_info(F f)217 static inline detail::thread_data_base* make_thread_info(F f) 218 218 { 219 219 return detail::heap_new<thread_data<F> >(f); 220 220 } … … 228 228 thread(); 229 229 ~thread(); 230 230 231 void __boost_workaround_to_set_thread_info(detail::thread_data_base* tinfo); 232 231 233 #ifdef BOOST_HAS_RVALUE_REFS 232 234 template <class F> 233 235 thread(F&& f): … … 237 239 } 238 240 #else 239 241 template <class F> 240 explicit thread(F f): 241 thread_info(make_thread_info(f)) 242 explicit thread(F f) 242 243 { 244 detail::thread_data_base* const tinfo = make_thread_info(f); 245 __boost_workaround_to_set_thread_info(tinfo); 243 246 start_thread(); 244 247 } 245 248 -
libs/thread/src/win32/thread.cpp
189 189 thread::thread() 190 190 {} 191 191 192 void thread::__boost_workaround_to_set_thread_info(detail::thread_data_base* const tinfo) 193 { 194 thread_info = tinfo; 195 } 196 192 197 void thread::start_thread() 193 198 { 194 199 uintptr_t const new_thread=_beginthreadex(0,0,&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id);