summaryrefslogtreecommitdiff
path: root/tests/thread/thread_shared1.py
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2021-03-16 12:21:50 -0500
committerJeff Epler <jepler@gmail.com>2021-03-16 12:21:50 -0500
commit58679dc038e475d7cd00ee45256b7f906ecc2240 (patch)
tree30cbc3f9e7e4efc81a43f364d554f33c1df34169 /tests/thread/thread_shared1.py
parent97b6664201de2530c9b92957a5e8d2a68524fa7e (diff)
parentbc690d4070c69e21d9070badc9f56a15d62ffb5d (diff)
Merge remote-tracking branch 'origin/main' into bitmap-read-2
Diffstat (limited to 'tests/thread/thread_shared1.py')
-rw-r--r--tests/thread/thread_shared1.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/thread/thread_shared1.py b/tests/thread/thread_shared1.py
index de339ad7f..87f8b51e2 100644
--- a/tests/thread/thread_shared1.py
+++ b/tests/thread/thread_shared1.py
@@ -6,9 +6,11 @@
import _thread
+
def foo(i):
pass
+
def thread_entry(n, tup):
for i in tup:
foo(i)
@@ -16,6 +18,7 @@ def thread_entry(n, tup):
global n_finished
n_finished += 1
+
lock = _thread.allocate_lock()
n_thread = 2
n_finished = 0