[zeromq-dev] term() would not exists if any sockets are not closed

Martin Sustrik sustrik at 250bpm.com
Fri May 27 16:23:55 CEST 2011


On 05/27/2011 04:20 PM, Pavel Chlupáček wrote:

> I just wonder if there is no any way how to force all sockets to
> close when term() is called. So far it blocks indefinitely the
> calling thread, and I wonder if there isn't any way to avoid that.
>
> I experimented a bit with linger opt, but did not get any visible
> result from it.
>
> I am on scala (java bindings) so hope it is not specific to java.

When you close all sockets (each from its own thread). Then zmq_term 
unblocks and the program is ready to terminate.

Martin


More information about the zeromq-dev mailing list