$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [atomic] Probable documentation issue: how do we know atomic is safe and/or efficient?
From: John Maddock (john_at_[hidden])
Date: 2013-12-24 08:43:55
I'm looking to use Boost.Atomic for the double-checked-locking-idiom, but 
I'm having trouble discovering
a) Whether the library is correctly implemented.
b) How efficient (or otherwise) the library is on various platforms.
I'm sure the answer to (a) is that it is correct, but I was surprised that 
atomic<int> relied on the volatile modifier for thread safe load/stores on 
MSVC, I had assumed that something more than that would have been required, 
but I know I'm out of date on this stuff!
I can't help thinking that questions like this could be allayed by better 
documentation - specifically what operations are used to ensure correctness 
on each supported platform, plus rationale and/or link to reference 
material.
My apologies if this has been covered already in the review, and I realize 
that documentation is a lot of work, but I can see no way to ensure 
correctness other than through code inspection, so proper documentation is 
essential in that case.
Regards, John.