summaryrefslogtreecommitdiff
path: root/scripts/LocalDriver.py
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-06-07 11:33:31 +0200
committerJose <jose@zeroc.com>2019-06-07 11:33:31 +0200
commit7d9486b9113d5bbb533ced14d4e145faf97dcda2 (patch)
tree6c7899e633ddf97c03df49156b1483b23010da3b /scripts/LocalDriver.py
parentFix code format fixes (diff)
parentJavaScript browser testing fixes (diff)
downloadice-7d9486b9113d5bbb533ced14d4e145faf97dcda2.tar.bz2
ice-7d9486b9113d5bbb533ced14d4e145faf97dcda2.tar.xz
ice-7d9486b9113d5bbb533ced14d4e145faf97dcda2.zip
Merge remote-tracking branch 'origin/3.7' into swift
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