$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [lockfree] review
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-08-26 13:03:07
on Thu Aug 25 2011, Alexander Terekhov <terekhov-AT-web.de> wrote:
> Ilya Sokolov wrote:
>>
>>
>> AFAIK, in the example above another thread can't observe reordering
>> without introducing UB.
>
> I meant "observed" as in "check the sequence of writes in the generated
> code".
Do we care about what the generated code looks like? IIUC what counts
is the sequence of memory states that another another thread can see.
> But int can be simply changed to relaxed atomic<int> so that another
> thread can observe reordering without UB.
Sure.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com