[zeromq-dev] zmq_term() blocks in 2.1

Martin Sustrik sustrik at 250bpm.com
Thu Jan 13 09:53:16 CET 2011

Hi Chris,

> Not strictly relevant to this thread, but FYI, the erlang bindings
> implementation at http://github.com/csrl/erlzmq supports this non-blocking
> behavior.  If any sockets are still open in the context, the zmq_term() wrapper
> returns EAGAIN and all sockets return ETERM.
> It was necessary to implement this in the erlang bindings, as blocking calls
> can not be allowed in erlang port drivers, as that would cause the erlang vm to
> freeze.
> It works well, and would be great if the concept makes it into the main 0MQ
> implementation.

So you are running zmq_term() in background thread, right? And there's a 
way to wait while it finishes before exiting the application, right?


More information about the zeromq-dev mailing list