Non-atomic ops allowed on shared variables?

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Dec 3 12:41:45 PST 2011


On 12/3/11, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> That page says that reads and writes are guaranteed to be atomic for shared.
> It does _not_ say that something like ++threadsCount is guaranteed to be
> atomic.

Woops, sorry it was a typo. I meant page 411, not 413. It says it's an
error there. Btw, I never said ++ was atomic, I've asked whether
something has changed. IOW I thought perhaps this used to be an error
but maybe it was changed to make increment/decrement to be atomic on
shared variables. That's not the case of course..


More information about the Digitalmars-d-learn mailing list