I have added a 100 ms LINGER to all sockets, but it does not change anything.
https://github.com/lalebarde/libzmq/commit/e64498610ce8976b9cade226e415b7646a7d02b3

Le 28/01/2014 15:20, Laurent Alebarde a écrit :
Hi Devs,

I am working on a test derived from /test_proxy.cpp/ with the use of/zmq_proxy_steerable/. After having sent TERMINATE to the control socket, the clients, the workers and the server task threads disapear as expected, but I have still three threads including main.

When it comes to:

*rc = zmq_ctx_term (ctx);*

It blocks. I assume it is waiting for the two other threads to terminate.

Inside *int zmq::ctx_t::terminate ()*, after the loop that stops the sockets: *sockets [i]->stop ();*, the condition in: *if (sockets.empty ())* is *false*. Shouln't it be *true* ? It blocks when it comes to: *int rc = term_mailbox.recv (&cmd, -1);*

Are the two extra threads remaining concerned by these two sockets ?

Should I wait for something in the client/worker/server tasks, before closing the sockets ?

The code is here: https://github.com/lalebarde/libzmq/commit/64574fe5425b3b5c8ed725eed620e6106412f3e3
The failing test is: /tests/test_proxy_chain.cpp
/It comes along a modification of /src/proxy.cpp /to be able to chain proxies in the same thread. I will propose a pull request when the test passes. But tests/test_proxy.cpp passes, and the nature of the modification is not suspect.

Cheers,


Laurent


_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to