
7 Jul
2006
7 Jul
'06
12:58 p.m.
Maxim Yegorushkin ha escrito:
JOAQUIN LOPEZ MU?Z wrote:
[...]
So my question is how to efficiently provide add_ref and release functions which are thread safe (wrt to refcounting)? I can use a class-level boost::detail::lightweight_mutex in the obvious way, but I understand shared_ptr uses much more advanced mechanisms and maybe these are available for (semi)public consuption at boost/detail.
An atomic counter should suffice. boost::detail::atomic_count.
That's it! Thank you very much, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo