Philippe A. Bouchard said:
> William E. Kempf wrote:
>
> [...]
>
>> As already pointed out, to associate data with a thread you use
>> thread_specific_ptr.  BTW, you still have to remember that the
>> functor is copied, and data passed to/in the functor is not
>> considered part of the thread in any event.
>
> Ok, how do you find out the data of the current thread?  The key in
> boost::detail::tss is not the same as the one in boost::thread.

What data?  The actual thread data (there's not much, beyond the thread id
which isn't direclty accessible) is found by calling the default c-tor on
the thread.  The data passed in the functor is your responsibility. 
Either you explicitly pass it everywhere that's needed, or the thread
stores it in a tss key.

-- 
William E. Kempf


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to