summaryrefslogtreecommitdiff
path: root/tests/thread/mutate_dict.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/thread/mutate_dict.py')
-rw-r--r--tests/thread/mutate_dict.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/thread/mutate_dict.py b/tests/thread/mutate_dict.py
index c57d332d5..89c93f4ee 100644
--- a/tests/thread/mutate_dict.py
+++ b/tests/thread/mutate_dict.py
@@ -5,7 +5,7 @@
import _thread
# the shared dict
-di = {'a':'A', 'b':'B', 'c':'C', 'd':'D'}
+di = {"a": "A", "b": "B", "c": "C", "d": "D"}
# main thread function
def th(n, lo, hi):
@@ -26,6 +26,7 @@ def th(n, lo, hi):
global n_finished
n_finished += 1
+
lock = _thread.allocate_lock()
n_thread = 4
n_finished = 0