As I understand the issue it works if you make sure to transfer ownership explicitly before the other thread gains access?

Maybe this is more clear:

http://www.1024cores.net/home/lock-free-algorithms/object-life-time-management/differential-reference-counting

 Ah, I think I follow.

So in C++ terms:
It basically requires either a global shared_ptr, or that you passed one around by reference between threads. And that you then killed it in one thread at the exact moment the control block was read in another thread. That blog post discusses a solution, I wonder if that is implemented in C++'s shared_ptr?


Reply via email to