[zeromq-dev] HWM behaviour & blocking
Justin Karneges
justin at affinix.com
Mon Jul 2 21:57:33 CEST 2012
On Friday, June 29, 2012 06:13:53 AM Paul Colomiets wrote:
> On Thu, Jun 28, 2012 at 9:06 PM, Justin Karneges <justin at affinix.com> wrote:
> > It's really just for functional completeness of my event-driven wrapper.
> > The only time I can see this coming up in practice is an application
> > that pushes a message just before exiting.
> >
> > For now, I set ZMQ_LINGER to 0 when a socket object is destroyed, making
> > the above application impossible to create. What I'm thinking of doing
> > now is offering an alternate, blocking-based shutdown method. This would
> > violate the spirit of my wrapper, but may work well enough for apps that
> > finish with a single socket doing a write-and-exit.
>
> I think you should just set linger and use it. zmq_close() doesn't
> block. The zmq_term() blocks.
Wow, silly me working around a non-problem. I was assuming zmq_close()
blocked. Thanks for clarifying.
Justin
More information about the zeromq-dev
mailing list