[zeromq-dev] [PATCH] Scalability improvements for large amounts of connections
Martin Sustrik
sustrik at 250bpm.com
Mon Oct 11 17:06:25 CEST 2010
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
More information about the zeromq-dev
mailing list