Hi Justin,

On Thu, Jun 28, 2012 at 9:06 PM, Justin Karneges <jus...@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. And usually starting an application has
much bigger overhead than sending a message. So in the case of
starting application, doing request(send) and shutting down, this
delay is probably negligible (unless your data is too big and/or
network is overloaded).

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

Reply via email to