
17 Nov
2006
17 Nov
'06
12:17 a.m.
I read the stuff from Chris Thommason and I have to admit that I'm not too sure how I'd wrap shared_ptr with it to make this work.
Here is an alternative to shared_ptr: http://appcore.home.comcast.net/vzoom/refcount/ This is my version of an atomically thread-safe reference counting that covers both basic and strong thread-safety models. Parts of it can also be used in a signal handler, because it has 100% lock-free weak increments/decrements' and pointer swap operations. It amortizes lock actions from the first strong reference to an object X, down to the drop-to-zero condition of object X. What do you think?