diff options
Diffstat (limited to 'tests/thread/thread_lock2.py')
-rw-r--r-- | tests/thread/thread_lock2.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/thread/thread_lock2.py b/tests/thread/thread_lock2.py index 405f10b0b..b842f69c9 100644 --- a/tests/thread/thread_lock2.py +++ b/tests/thread/thread_lock2.py @@ -10,15 +10,17 @@ import _thread lock = _thread.allocate_lock() + def thread_entry(): lock.acquire() - print('have it') + print("have it") lock.release() + # spawn the threads for i in range(4): _thread.start_new_thread(thread_entry, ()) # wait for threads to finish time.sleep(1) -print('done') +print("done") |