[zeromq-dev] Issue 85 & 92
sustrik at 250bpm.com
Sat Oct 16 16:42:11 CEST 2010
On 10/16/2010 04:30 PM, Pieter Hintjens wrote:
>> 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.
> So if you had some API that exotic programs could use to tell
> 0MQ that they wanted to migrate a socket to a new thread, say
> zmq_setsockopt (socket, ZMQ_MIGRATE), this would allow simple programs
> to work simply (and zmq_term to work correctly for them), while asking
> exotic programs to do extra work.
Not even that. The problem is that while you may be notified about the
migration of the socket to the OS thread executing zmq_term, you cannot
directly touch it as you have no guarantee that it won't be migrated to
a different OS thread afterwards.
Anyway, the "exotic programs" means basically any language runtime. I am
not sure that Oracle would modify it's Java VM or that MSFT would tweak
.NET runtime just to work well with 0MQ.
More information about the zeromq-dev