
Porting lock-free data structures from Java is complicated by the fact that the implementations assume garbage collection. There are a few techniques available for dealing with manual memory management without locks, but they complicate the implementation of algorithms that are complex enough already. So I'm thinking about trying to implement an atomic_shared_ptr<T> along the lines of the interface for other atomics defined in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html but using shared_ptr<T> as a value type. The implementation I'm thinking of uses hazard pointers (http://erdani.org/publications/cuj-2004-12.pdf) and double-wide-cas (cmpxchg16b on x86-64). So I have three questions for this list: 1) Would there be interest in adding such a type to the Boost smart pointers? 2) Has someone already done this? 3) Is anyone already working on an implementation of atomic<T> from N2427? I'm unlikely to need the whole thing, so even a half-completed public repository would be helpful. Thanks, Jeffrey Yasskin