[zeromq-dev] zmq_poll
Martin Sustrik
sustrik at 250bpm.com
Fri May 21 17:00:44 CEST 2010
Hi Serge,
> It would be nice to have 0MQ sockets owned by Erlang light-weight
> processes (LWPs). What's perceived in 0MQ world as application threads
> would by the OS kernel threads running Erlang VM schedulers. The
> problem is that there's no control on which kernel thread LWPs would be
> scheduled and therefore we cannot assume that a socket gets created on
> some application thread and further send/receive calls would be done on
> the same application thread. I am not quite clear why there is such a
> hard restriction in 0MQ to enforce a hard relationship between 0MQ
> sockets and an application thread. I suppose it's done to avoid locking
> at some level, but could this restriction somehow be optionally lifted?
In theory, it can be done modifying 0MQ so that it creates app_thread
for each socket.
That way socket could be migrated between threads -- assuming that full
memory barrier is executed during the migration.
Martin
More information about the zeromq-dev
mailing list