[zeromq-dev] zmq::context_t fails to exit, stuck in infinite loop waiting dezombify()

Martin Sustrik sustrik at 250bpm.com
Sat Dec 11 08:42:24 CET 2010


Hi Martin,

> In my initial test case, I queue up a random assortment of messages
> and publish them, without having connected any subscribers.  This
> continues for a short period, before I signal the publishing thread to
> shutdown.  both zmq::context_t and zmq::socket_t are in the local
> scope, and are auto destroyed when scope exits.

0MQ is trying to send the messages, but there's noone to receive them.

To make it exit immediately, droping any outstanding messages, set the 
socket option ZMQ_LINGER to zero.

Martin



More information about the zeromq-dev mailing list