Tweaking atomics and memory barriers in shared_ptr

Jonathan Wakely jwakely.gcc@gmail.com
Sun Oct 28 11:51:00 GMT 2007


On 27/10/2007, Peter Dimov <pdimov@mmltd.net> wrote:
>
> Whether use_count() should have acquire semantics instead of relaxed is not
> quite clear even to me. I can think of no legitimate example of inter-thread
> communication via use_count(), so I tend toward "relaxed", which is
> basically why Boost uses a volatile read.

Thanks Peter,
Following that explanation I'll revise the comment in my patch and I
apologise for calling it a hack  :-)
Jon



More information about the Libstdc++ mailing list