From: Dmitriy V'jukov (dvyukov_at_[hidden])
Date: 2007-04-19 05:12:06
Peter Dimov wrote:
> There's also a hidden ordinary store to the vtable pointer. In general,
> passing an object X from thread A to thread B, you are expected to ensure
> the necessary visibility (and not the author of X). Usually the queue that
> you're using for message passing will contain the acquire/release pair in
> pop/push. Otherwise you wouldn't be able to pass ordinary objects between
> threads. Or to take a simple example:
Thank you very much. Now I understand.
I underestimate the "pass to another thread" procedure, that must contain
all necessary fences to ensure visibility of counter variable.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk