[zeromq-dev] Poll on sockets OR child process

Michel Pelletier pelletier.michel at gmail.com
Thu Nov 28 00:07:14 CET 2013


Cool!  I didn't know about signalfd...

Thanks!

-Michel


On Wed, Nov 27, 2013 at 12:36 PM, Michael Haberler <mail17 at mah.priv.at>wrote:

>
> Am 27.11.2013 um 20:23 schrieb Greg Ward <greg at gerg.ca>:
>
> > Hi all --
> >
> > I'm hacking on a task distribution system used internally here. It has
> > N masters sending tasks (shell commands) out to M workers, and then
> > doing stuff with the results. There's something that annoys me
> > slightly about the implementation: the worker runs each task in a
> > separate thread.
> >
> > IMHO it would be ever so much nicer to just spawn the child process
> > that runs a task, and harvest the results when they are ready. IOW, I
> > want to integrate wait() and zmq_poll() in a single event loop.
> >
> > Is there any sane way to do this? (The whole system is written in
> > Python, using zeromq-3.2.3 and pyzmq 13.1.0.)
>
> maybe you'd want to use SIGCHLD and poll on a signalfd
>
> -m
>
> >
> > Thanks --
> >
> > Greg
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131127/d75f50be/attachment.html>


More information about the zeromq-dev mailing list