[zeromq-dev] Issue 85 & 92

Martin Sustrik sustrik at 250bpm.com
Sat Oct 16 14:17:47 CEST 2010

On 10/16/2010 02:11 PM, Martin Sustrik wrote:
> On 10/16/2010 01:58 PM, Pieter Hintjens wrote:
>> So the sender thread can presumably detect that it's sending a message
>> to itself?  It has the same signaler object as the thread it's sending
>> to.  So it doesn't need to send a message, and doesn't need to wait
>> for a reply (which can provably never arrive).
> The "0MQ threads" are the following:
> 1. Each I/O thread lives in a separate "0MQ thread"
> 2. Each socket lives in a separate "0MQ thread"
> 3. Special administrative "0MQ thread"
> zmq_term runs in context of the administrative 0MQ thread (3) while 
> each socket lives in its dedicated 0MQ thread (2). Thus, from 0MQ's 
> perspective they are running in different threads.
To put it more simply: While your test program is well behaved and 
doesn't migrate the socket, 0MQ has no way to be sure that. If the 
client happens to be Erlang VM or somesuch, it can easily migrate the 
socket to another OS thread without even letting 0MQ know about the fact.


More information about the zeromq-dev mailing list