summaryrefslogtreecommitdiff
path: root/scripts/LocalDriver.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/LocalDriver.py')
-rw-r--r--scripts/LocalDriver.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/LocalDriver.py b/scripts/LocalDriver.py
index 291d7bf546e..a04c03157a0 100644
--- a/scripts/LocalDriver.py
+++ b/scripts/LocalDriver.py
@@ -571,19 +571,26 @@ class LocalDriver(Driver):
# behind.
#
failure = []
+ sem = threading.Semaphore(0)
def stopServerSide():
try:
self.runner.stopServerSide(server, current, success)
except Exception as ex:
failure.append(ex)
+ sem.release()
t=threading.Thread(target = stopServerSide)
t.start()
while True:
try:
- t.join()
+ #
+ # NOTE: we can't just use join() here because of https://bugs.python.org/issue21822
+ # We use a semaphore to wait for the servers to be stopped and return.
+ #
+ sem.acquire()
if failure:
raise failure[0]
+ t.join()
break
except KeyboardInterrupt:
pass # Ignore keyboard interrupts