Boost logo

Boost :

Subject: Re: [boost] [thread] thread_specific_ptr performance
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-01-09 09:01:34


On 01/09/2010 04:55 PM, Andrey Semashev wrote:
> On 01/09/2010 02:57 PM, Stefan Strasser wrote:
>> Am Saturday 09 January 2010 13:58:35 schrieb Andrey Semashev:
> However, __thread doesn't allow to register a cleanup function that is
> required by Boost.Thread. You could create a dummy TLS with pthread API
> for that, but then I'm not sure if you could reliably access __thread
> variables from that function.

On the second thought, yes, it seems quite possible to store the pointer
in both TLSs - the pthread and __thread one, and register the cleanup
for the former. Good point you have!


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk