|
Boost : |
Subject: Re: [boost] [Atomic] Rationale for preventingcopyconstruction/assignment?
From: Peter Dimov (lists_at_[hidden])
Date: 2013-05-31 05:23:14
Anthony Williams wrote:
> Suppose a1,a2 are initially zero
>
> Thread 1 then does:
>
> a2=1; //A
> ++a2; //B
> a1=3; //C
>
> r1=a1; //D
>
> Thread 2 does:
> a1=a2; //E
Yes, you are right. In fact, you can remove (B) from the example, it would
still work.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk