Boost Users :
From: VÃ¡clav Haisman (v.haisman_at_[hidden])
Date: 2008-06-14 18:06:21
Frank Birbacher wrote, On 14.6.2008 22:55:
> I'm looking for a method to execute some code for each thread starting.
> It suffices to run that code for each boost::thread. I want to
> initialize some thread local storage for each thread automatically. The
> creating(!) thread shall supply an initial value and the created(!)
> thread shall receive this value, essentially a copy of some thread local
> variable. That is the new thread shall create a copy of the same
> variable which the creating thread has. Is that possible using
> I hope my explaination is clear enough.
I think you could pass the value to your thread function as bare pointer and
then store it in boost::thread_specific_ptr<>.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net