On Fri, Apr 28, 2017 at 7:27 PM, Bernardo Ramos <[email protected]> wrote:
> Hi!
>
> When we pass a pointer to another thread on multi-core processors the
> receiving thread may have an old copy of the memory place in its cache (am I
> wrong?)
>
> I read the uv_async_send implementations for win and linux but did not found
> memory barriers/fences.
>
> Is it safe to access the memory pointed by the pointer on the other thread
> on multi-core and/or multi-processor computers?

You answered the question yourself: no, because libuv does not issue
memory barriers.  In many cases you won't actually need them but if
you want to play it safe, issue them explicitly.

The right way to think about uv_async_send() is as a notification
mechanism, not a synchronization mechanism.

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to