This is the mail archive of the
mailing list for the GCC project.
Re: Tweaking atomics and memory barriers in shared_ptr
On 27/10/2007, Peter Dimov <firstname.lastname@example.org> 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.
Following that explanation I'll revise the comment in my patch and I
apologise for calling it a hack :-)