
19 Apr
2007
19 Apr
'07
9:12 a.m.
Peter Dimov wrote:
There's also a hidden ordinary store to the vtable pointer. In general, when 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. Dmitriy V'jukov