Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

An atomic reference count seems sufficient, but I could be wrong.


It is actually quite tricky to lock-free swap a concurrently-accessed reference counted pointer. The reference count is not associated with the pointer, but with the pointee, so a 2CAS is not enough.

Typically you need hazard pointers or similar deferred reclamation tricks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: