On Sat, Aug 28, 2010 at 7:34 PM, Chuck Remes <[email protected]> wrote:

> I am wondering if I am misusing the framework. Briefly, the crash occurs when 
> calling zmq_close from another thread on a socket that is blocked on 
> send/recv. It sometimes asserts on object.cpp line 342, sometimes hangs, 
> sometimes segfaults, etc.
>
> I thought it would be safe to call zmq_close on sockets in other threads 
> since calling zmq_term can safely do so. Am I wrong? If so, what is a safe 
> way to signal a blocked socket so it can cleanly shut itself down (without 
> calling zmq_term)?

Calling close on a socket that is not owned by that thread is not safe
afaik.  The correct way to signal any socket is to send it a message.



-
Pieter Hintjens
iMatix - www.imatix.com
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to