summaryrefslogtreecommitdiff
path: root/tests/thread/thread_lock2.py
diff options
context:
space:
mode:
authorKevin Matocha <kmatocha@icloud.com>2021-03-17 09:30:51 -0500
committerKevin Matocha <kmatocha@icloud.com>2021-03-17 09:30:51 -0500
commitef91e1752c233e45bfa898eb67caab44f1b02313 (patch)
tree9b6f26eb1bd0d54143b4d174cec720dcaca8065e /tests/thread/thread_lock2.py
parent870dadc85adce4f10fa57dda1d11dda48b25dbc1 (diff)
parentbfc8c89536e12dba0cc9adc0065819d730bb0983 (diff)
merge upstream/main
Diffstat (limited to 'tests/thread/thread_lock2.py')
-rw-r--r--tests/thread/thread_lock2.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/thread/thread_lock2.py b/tests/thread/thread_lock2.py
index 4ef912dff..c43b4b18d 100644
--- a/tests/thread/thread_lock2.py
+++ b/tests/thread/thread_lock2.py
@@ -12,15 +12,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")