Subject: Re: [boost] [thread] thread_specific_ptr performance
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-01-12 16:31:01
Am Tuesday 12 January 2010 21:10:57 schrieb vicente.botet:
> I have never talk about reset function but the operator*. Just quoting
> yourself "thread_specific_ptr operator*:
> one branch to make sure the vector is large enough(a new
> thread_specific_ptr might have been created by another thread), one
> constant-time average, linear to vector if reallocation is necessary.
> but that can only happen when a new thread_specific_ptr was created."
like I said, "peter´s right, no reallocation in operator*.".
I should have differentiated between get(), reset() and operator* in that
the fact is that only reset() needs to reallocate, and the discussion of
possibly changing the implementation of thread_specific_ptr should be
continued on that basis, no matter what I mistakenly wrote before.
sorry for the confusion.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk