Subject: Re: [boost] [thread] thread_specific_ptr performance
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-01-09 07:22:23
On 01/09/2010 03:19 AM, Stefan Strasser wrote:
>> As Anthony has already state on other threads this seems to be not posible
>> (the semantic is different).
> could you point me towards that thread? the one about dynamically loaded
I don't have a discussion thread at hand, but these pages of MSDN may be
of interest for you:
* The TLS must have static duration.
* Only POD types are supported as TLS declared with __declspec(thread).
* It doesn't work if TLS is defined in a delay-loaded dll.
Not sure what constraints are for __thread in GCC but it looks like it
too supports only POD types with static duration.
Also, AFAIU, these mechanisms are based on OS-provided APIs, which may
have rather constrained TLS capacity. With Boost.Thread solution there's
virtually no limit for the number of thread-specific variables you may have.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk