Subject: Re: [boost] Fwd: [sync?] "Distributed" value (or something...)
From: Klaim - JoÃ«l Lamotte (mjklaim_at_[hidden])
Date: 2014-07-31 04:23:08
On Wed, Jul 30, 2014 at 11:36 AM, Peter Dimov <lists_at_[hidden]> wrote:
> I'd say that the problem with the callback architecture is that you still
> need to communicate the change to the readers, which would require them to
> still poll an atomic variable at the very least. And if they poll, there's
> no need for callbacks. Just have the writer increment a version counter.
> weak_ptr's would be slightly less performant because they do a CAS on lock,
> instead of just an atomic read. I'm not sure if this would matter that much
If a copy of the new value is passed as argument to the callbacks, then I
don't see the problem - except the cost of the copy of course.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk