
May I volunteer myself for doing that (probably implement the atomic operations draft for boost)? On Sun, Sep 21, 2008 at 11:00 AM, Kris Rousey <krousey@gmail.com> wrote:
cg wrote:
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;
If all you're wanting is atomic operators, ACE's (http://www.cs.wustl.edu/~schmidt/ACE.html) ACE_Atomic_Op template (http://www.dre.vanderbilt.edu/Doxygen/5.6.6/html/ace/a00029.html) provides that. It synchronizes all arithmetic, assignment, and comparison operators. I've used it before to do intrusive reference counting on shared closures. A utility class that just synchronizes operations shouldn't be too hard to write "boost" way.
--Kris _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- - Felipe Farinon