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

Idan Kamara idankk86 at gmail.com
Tue Feb 19 13:56:33 CST 2013

On Tue, Feb 19, 2013 at 9:53 PM, Bryan O'Sullivan <bos at serpentine.com>
> 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.

Oh, missed that.

>> 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 necessary.)

Makes sense, thanks for clarifying.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130219/775bf5b2/attachment.html>

More information about the Mercurial-devel mailing list