Mercurial > hg
changeset 30416:c27614f2dec1
worker: stop using a separate thread waiting for children
Now that we have a SIGCHLD hander, and it could get executed when waiting
for I/O. It's no longer necessary to have a separated waitpid thread. So
just remove it.
author | Jun Wu <quark@fb.com> |
---|---|
date | Sat, 12 Nov 2016 03:06:07 +0000 |
parents | e8fb03cfbbde |
children | 854190becacb |
files | mercurial/worker.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/worker.py Sat Nov 12 03:07:22 2016 +0000 +++ b/mercurial/worker.py Sat Nov 12 03:06:07 2016 +0000 @@ -11,7 +11,6 @@ import os import signal import sys -import threading from .i18n import _ from . import ( @@ -138,11 +137,9 @@ pids.add(pid) os.close(wfd) fp = os.fdopen(rfd, 'rb', 0) - t = threading.Thread(target=waitforworkers) - t.start() def cleanup(): signal.signal(signal.SIGINT, oldhandler) - t.join() + waitforworkers() signal.signal(signal.SIGCHLD, oldchldhandler) status = problem[0] if status: