[zeromq-dev] Poll on sockets OR child process

Greg Ward greg at gerg.ca
Wed Dec 18 15:33:47 CET 2013


On 27 November 2013, I said:
> 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.

Thanks again to Michael Haberle for the tips. Since this was
non-obvious to me, I assume it will be non-obvious to others in
future. So I made several working examples and wrote up a blog post:

  http://gerg.ca/blog/post/2013/zmq-child-process/

Comments/criticisms are welcome.

       Greg
-- 
Greg Ward                            http://www.gerg.ca
<greg at gerg.ca>                       @gergdotca



More information about the zeromq-dev mailing list