diff options
Diffstat (limited to 'tests/thread/thread_qstr1.py')
-rw-r--r-- | tests/thread/thread_qstr1.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/thread/thread_qstr1.py b/tests/thread/thread_qstr1.py index f4136d964..40ee2910c 100644 --- a/tests/thread/thread_qstr1.py +++ b/tests/thread/thread_qstr1.py @@ -13,6 +13,7 @@ def check(s, val): assert type(s) == str assert int(s) == val + # main thread function def th(base, n): for i in range(n): @@ -23,10 +24,11 @@ def th(base, n): global n_finished n_finished += 1 + lock = _thread.allocate_lock() n_thread = 4 n_finished = 0 -n_qstr_per_thread = 100 # make 1000 for a more stressful test (uses more heap) +n_qstr_per_thread = 100 # make 1000 for a more stressful test (uses more heap) # spawn threads for i in range(n_thread): @@ -36,4 +38,4 @@ for i in range(n_thread): while n_finished < n_thread: time.sleep(1) -print('pass') +print("pass") |