[zeromq-dev] blocking

john skaller skaller at users.sourceforge.net
Sat Jan 21 23:34:24 CET 2012

Which ops in 0MQ can block?

I know these can block:


can anything else block?  Most of the other ops would seem to
work async so don't block, right?

I have to get rid of all blocking ops. This means, for example, that
when the client says "send", it doesn't actually call zmq_send.

Instead, the request is wrapped up in a struct and put in a queue.
A separate pthread picks up the request and arranges to service
it with a non-blocking op and polling. This will actually dispatch
any I/O to zmq internals running in the zmq_init n pthreads.

The service request mechanism already exists in Felix, and is already
used for ordinary socket I/O. But stream I/O sucks. We need messages.. :)

john skaller
skaller at users.sourceforge.net

More information about the zeromq-dev mailing list