Boost logo

Boost :

Subject: Re: [boost] [lockfree] review
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-08-24 02:37:14


on Tue Aug 23 2011, Alexander Terekhov <terekhov-AT-web.de> wrote:

> Dave Abrahams wrote:
>
> [... memory model ...]
>
>> It's not really different than locking. If you want to write to shared
>> data, you need some way of making it not-a-race. It's just that when
>> the data structure is small enough (like an int) you can make it atomic
>> instead of putting a lock around it.
>
> No.

All I'm saying here is that a C++11 default atomic int is equivalent to
an int, coupled with an associated mutex, where accesses to the int are
always protected by locking the associated mutex. If you're seriously
disagreeing with *that*, please say explicitly on what grounds.

If you're not disagreeing with that, we have no disagreement and you're
just grinding some irrelevant axe.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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