diff options
Diffstat (limited to 'tests/thread/thread_start1.py')
-rw-r--r-- | tests/thread/thread_start1.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/thread/thread_start1.py b/tests/thread/thread_start1.py index d23a74aa2..f0e696840 100644 --- a/tests/thread/thread_start1.py +++ b/tests/thread/thread_start1.py @@ -8,16 +8,19 @@ except ImportError: import time import _thread + def foo(): pass + def thread_entry(n): for i in range(n): foo() + _thread.start_new_thread(thread_entry, (10,)) _thread.start_new_thread(thread_entry, (20,)) # wait for threads to finish time.sleep(1) -print('done') +print("done") |