Boost logo

Boost :

Subject: Re: [boost] [Circular Buffer] Partial thread-safety
From: Dmitry Goncharov (dgoncharov_at_[hidden])
Date: 2008-11-26 07:46:33


Lasse Kärkkäinen wrote:
>> Where is the magic? Can you point to some documentation or how to use
>> it?
>
> It seems to make the assumption that volatile variable reads and
> writes are atomic. This, among with careful organization of those
> operations, allows safe concurrent access.
>
This sort of assumption looks wrong. volatile should only instruct the
compiler not to optimize the variable (e.g. in a register).

BR, Dmitry


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