This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]