Boost logo

Boost :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2006-04-07 07:38:04


On 4/7/06, Peter Dimov <pdimov_at_[hidden]> wrote:
> Felipe Magno de Almeida wrote:
>
> > It seems to me that thread_specific_ptr has a broken
> > interface and documentation, since it doesnt address the local static
> > thread-safety issue. Which leads users to use it erroneously.
>
> Whether local statics are thread-safe is implementation dependent, and is
> not limited to thread_specific_ptr. _Any_ dynamically initialized local
> static can lead to the failure you described.

Surely, and that's why it is wrong to use it in portable code that way.
And, IMO, the interface of thread_specific_ptr leads to believe that
it is safe to use it that way.

--
Felipe Magno de Almeida

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