Boost logo

Boost :

Subject: Re: [boost] [thread] thread_specific_ptr performance
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-01-12 10:05:24


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.

> 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.


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