
19 Nov
2010
19 Nov
'10
5:14 p.m.
michi7x7
Hi, you can easily do this using Boost.Atomic and intrusive_ptr:
http://www.chaoticmind.net/~hcb/projects/boost.atomic/doc/atomic/usage_examp...
It should be easy to make (un-)reference and counter-operations atomic using this ;)
Looks very promising. How would I increment reference count atomically by 1000? Like this? x->refcount_.fetch_add(1000, boost::memory_order_relaxed); I gather this is not Boost library yet, right? What's plan for that? Can I use it in my code? How portable is it now? Thank you Gennadiy