diff options
Diffstat (limited to 'Lib/test/lock_tests.py')
-rw-r--r-- | Lib/test/lock_tests.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py index 136f1c3..b325bce 100644 --- a/Lib/test/lock_tests.py +++ b/Lib/test/lock_tests.py @@ -39,8 +39,12 @@ class Bunch(object): self.finished.append(tid) while not self._can_exit: _wait() - for i in range(n): - start_new_thread(task, ()) + try: + for i in range(n): + start_new_thread(task, ()) + except: + self._can_exit = True + raise def wait_for_started(self): while len(self.started) < self.n: |