On 10/11/2010 04:57 PM, Pieter Hintjens wrote:

>> In other words, you cannot use the same
>> socket from 2 threads in parallel
>
> By "ensure full memory barrier" you mean that sockets are not safe to
> use from multiple threads at the same time?

No you can't use same socket from two threads at the same time.

The memory barrier is unrelated to the above. It's a machine instruction 
that ensures that the caches are synchronised and instruction reordering 
doesn't happen across the barrier. That way you can be sure that 
lock-free algorithms see a consistent data in memory after migration is 
done.

Martin
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to