
21 Sep
2008
21 Sep
'08
2:45 a.m.
Janek Kozicki wrote:
Hi,
I looked through Boost.Threads and Boost.Interprocess libraries, but (as far as I can tell) none of them offers me simple:
class Foo { boost::atomic<int> bar; }
which would mean that *ALL* attempts to access bar would be atomic, eg. bar=10;
I am also wondering if there is any ongoing efforts to bring such atomic operations library into boost, which is in new C++ draft spec now: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2723.pdf
Am I left with troublesome usage of boost::mutex to block all that access attempts by myself?
AFAK, it is the only choose, for now.