[zeromq-dev] How to exit a blocking Receive call cleanly?

Paulmichael Blasucci pblasucci at gmail.com
Mon May 19 15:04:36 CEST 2014


Have you considered using a poll-based receive and periodically checking a
CancellationToken? This approach has served me quite well in fszmq.



On Mon, May 19, 2014 at 3:33 AM, mark <manwoodvice at googlemail.com> wrote:

> I have a blocking Receive call that runs on a background thread for as
> long as the logical endpoint has not be stopped. The call to terminate an
> endpoint comes from a different thread, meaning the blocking Receive call
> throws some kind of exception - ObjectDisposed, SEH or AccessViolation.
> Is there a better pattern for this kind of setup? I'm using C# and clrzmq.
> Thanks
> _______________________________________________
> 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/20140519/aaec2faa/attachment.htm>

More information about the zeromq-dev mailing list