* Pieter Hintjens <[email protected]> [2011-12-22 11:40:57 -0600]: > On Thu, Dec 22, 2011 at 1:30 AM, Philip Kovacs <[email protected]> wrote: > > > Yeah, but then you create an obligation on the part of the main thread > > to poll its side of the pipe also.... > > Yes, exactly. There's no other way to do a clean shutdown. If you're > happy with a forced shutdown, we could add an API call that grabs back > signal handling (since it's an exceptional case, I'd rather that was > extra work, leaving the majority case to work as now).
So, is this technique ok for the attached thread?
Am I correct that, if the attached thread sends no explicit message,
the main thread will not see anything on its zmq_pollitem_t, even if
all masks are set on (ZMQ_POLLIN | ZMQ_POLLOUT | ZMQ_POLLERR) ?
Phil
static void
threadFunc__ (void *args, zctx_t *context, void *pipe)
{
/*
...
*/
if (zloop_start (loop) < 0)
{
zstr_send (pipe, "INTR");
};
zloop_destroy (&loop);
}
signature.asc
Description: Digital signature
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
