diff options
Diffstat (limited to 'tests/thread/thread_exit1.py')
| -rw-r--r-- | tests/thread/thread_exit1.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/thread/thread_exit1.py b/tests/thread/thread_exit1.py index c4a93c45a..186a9be34 100644 --- a/tests/thread/thread_exit1.py +++ b/tests/thread/thread_exit1.py @@ -13,8 +13,13 @@ def thread_entry(): _thread.exit() -_thread.start_new_thread(thread_entry, ()) -_thread.start_new_thread(thread_entry, ()) +for i in range(2): + while True: + try: + _thread.start_new_thread(thread_entry, ()) + break + except OSError: + pass # wait for threads to finish time.sleep(1) |
