Boost logo

Boost :

Subject: Re: [boost] [thread] thread_specific_ptr performance
From: Vicente Botet Escriba (vicente.botet_at_[hidden])
Date: 2010-01-12 10:25:26

Peter Dimov-5 wrote:
> Vicente Botet Escriba wrote:
>> For me it is unacceptable to use reallocation of the vector on the
>> operator*.
> Operator* has a non-NULL precondition and doesn't need to reallocate.
> reset() does, but only if you set a thread_specific_ptr that has been
> created after the thread has started.
I was responding to the proposition of Stefan, not to the current

Peter Dimov-5 wrote:
>> More, any non-constant time operator* don't satisfy my requirements for
>> some specific contexts.
> I don't think that any implementation gives you this constant time
> guarantee
> if you continually create thread-specific variables.

When you say "continually create thread-specific variables" do you mean
without removing them. In this case you will reach the limit of keys, but
this seems to me a use case that has not too much sens.
pthread give it for a limited number of key, isn't it?


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at