[zeromq-dev] Newbie Bait Request: Debug "Warning" mechanism.
ph at imatix.com
Tue Aug 17 17:44:30 CEST 2010
On Tue, Aug 17, 2010 at 4:48 PM, Matt Weinstein
<matt_weinstein at yahoo.com> 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
> 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
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.
More information about the zeromq-dev