mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
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.
This commit is contained in:
parent
483697646a
commit
ea73f2efd0
@ -11,7 +11,6 @@ import errno
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
import threading
|
||||
|
||||
from .i18n import _
|
||||
from . import (
|
||||
@ -138,11 +137,9 @@ def _posixworker(ui, func, staticargs, args):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user