On Tue, Aug 17, 2010 at 4:48 PM, Matt Weinstein
<[email protected]> wrote:

> IMO you might consider an error return, but asserting here is fragile.
> IMO waiting forever is consistent (no other recv fails because it doesn't
> understand why you're doing something).  The failure is easily detected and
> remedied.
> However, I'll make you a deal: add a setsockopt like ZMQ_SUBSCRIBE_EMPTY_OK
> to remove the error behavior.  Then I can happily use it if I know what I'm
> doing.

Here's a better deal: provide me just one real use case for blocking
on a zombie SUB.

"Waiting for termination" is a possible use case but using a zombie
SUB for this does not make sense, it's abuse of semantics.

Polling on a set of sockets that includes zombie SUBs is valid because
that is precisely how you bring a zombie SUB back to life.

Similarly, doing a NOBLOCK recv() on a zombie SUB is valid for the same reason.

There is no defacto reason to make poll() to work like a blocking
recv().  They do different things.

Sorry to be difficult here but it seems a no-brainer.  Zombie joke, hehe.

-Pieter
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to