This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Tweaking atomics and memory barriers in shared_ptr
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