Boost logo

Boost Users :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2006-12-28 09:45:37


On 12/28/06, Roland Schwarz <roland.schwarz_at_[hidden]> wrote:
> Sebastian Redl wrote:
> > What makes me believe it is that there will ever only be one writer.
>
> Your code does not enforce this in any way.
>
> Besides this it never is safe to access any shared data item from
> multiple threads, even if it is for reading only. The only exception is
> when you know for sure, that the access is atomic. The C++ standards
> does not give you any guarantees on this. (But work is in progess.)

If you talk about C++ standard then nothing is guaranteed at all about
threading, since there isnt anything in the current standard about it.
Nor about atomic access, so atomic access is too platform specific.

>[snipped]

>
> Roland

best regards,

-- 
Felipe Magno de Almeida

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net