#1674032: return value of flag from Event.wait(). OKed by Guido.
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index c8f9cac..cb6f6d2 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -186,7 +186,8 @@
# Now raise an exception in the worker thread.
if verbose:
print " waiting for worker thread to get started"
- worker_started.wait()
+ ret = worker_started.wait()
+ self.assertTrue(ret)
if verbose:
print " verifying worker hasn't exited"
self.assert_(not t.finished)
diff --git a/Lib/threading.py b/Lib/threading.py
index a776c66..cc2be1b 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -391,6 +391,7 @@
try:
if not self.__flag:
self.__cond.wait(timeout)
+ return self.__flag
finally:
self.__cond.release()