[zeromq-dev] How to unblock a socket when on Recieve call

Jason Smith jason.nevar.smith at gmail.com
Fri Jan 25 00:41:04 CET 2013

Hi Manuel,

If you destroy the context the socket was created from, with a ling of zero
set of the socket, you will see the socket raise an exception from the
receive call. Handle the exception as a graceful terminate. I have seen no
difference between polls and direct receive calls in code that I have
written, setting the linger value on the socket is important though.

Hope that helps.

On 25 January 2013 07:13, Manuel Felicio <manuelfelicio at gmail.com> wrote:

> Hi all,
> I'm doing this by using Receive with 1second timeout, inside a
> while(isRunning) loop, so I can check the flag every second and dispose the
> socket, gracefully.
> I noticed a very slow performance when using poll reads when compared to
> plain Receive reads.
> I'm using c# as well (clrzmq with libzmq 3.2)
> Best regards,
> Manuel Felício
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130125/5a0e001b/attachment.htm>

More information about the zeromq-dev mailing list