[PATCH 3 of 3] worker: handle worker failures more aggressively

Bryan O'Sullivan bos at serpentine.com
Tue Feb 19 13:53:43 CST 2013

On Tue, Feb 19, 2013 at 11:00 AM, Idan Kamara <idankk86 at gmail.com> wrote:

> And here you're waiting for it to finish, but what happens
> if for some reason one of the previous children fails first?

os.wait waits for any process to finish. None of the values in the list of
pids is used in that loop.

> Why not use select on the children and also spare the thread?

select works on file descriptors, not pids. We need some mechanism to catch
early-exiting children immediately. We could possibly do that by having a
pipe per child and detect EOF on each pipe, but that's way more work. (It
might turn out to be necessary at some point, e.g. for Windows, but I don't
want to further complicate the code until I know that said complexity is
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130219/364b1407/attachment.html>

More information about the Mercurial-devel mailing list