Boost Users :
Subject: Re: [Boost-users] Boost Atomic ?
From: Tim Blechmann (tim_at_[hidden])
Date: 2011-06-19 10:02:54
> I was surprised to see that the Boost distribution doesn't have the "atomic"
> library. I expected it to be part of the Threading, modeled on the C++0x
> I found <http://www.chaoticmind.net/~hcb/projects/boost.atomic/> via Google,
> from 2009. But N3225=10-0215 (is there a later Draft available ?) Â§29.2 shows
> lots of change bars, and the <atomic> header seems completely redone, it
> appears to make everything nicely templatated.
> I wonder if this is at all up-to-date, or why it's not already more officially
> part of
> Boost. Does anybody know? More to the point, I want to write some code that
> is portable across platforms, including emerging platforms like tablets which
> I expect will be more
> varied in their CPU architecture. I've been spoiled with writing x86-only for
> so many
> years! It makes sense to use the constructs that will be shipped with the
> compiler some
> day. So, where can I find that?
i am using boost.atomic heavily for boost.lockfree, which is going to be
reviewed in july. for now i am maintaining a patched version of boost.atomic as
part of the boost.lockfree repository.
not sure, how well boost.atomic matches the c++0x draft (i did not check the
recent modifications of document in detail), but the main part, the atomic<>
class is provided. however i am not sure, how well supported boost.atomic is in
general. i have fixed a few issues recently and sent patches to the original
author, but never heard back from him. also the library was submitted for
review, but it seem it has been removed from the review schedule :/
unfortunately i do not know any compiler which already implements c++0x atomics,
so if your platform is supported by boost.atomic, it is probably the best
solution until real c++0x atomics are widely available ...
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net