diff options
Diffstat (limited to 'tests/thread/stress_heap.py')
-rw-r--r-- | tests/thread/stress_heap.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/thread/stress_heap.py b/tests/thread/stress_heap.py index 5482a9ac6..2ad91ae14 100644 --- a/tests/thread/stress_heap.py +++ b/tests/thread/stress_heap.py @@ -9,9 +9,11 @@ except ImportError: import time import _thread + def last(l): return l[-1] + def thread_entry(n): # allocate a bytearray and fill it data = bytearray(i for i in range(256)) @@ -33,6 +35,7 @@ def thread_entry(n): global n_finished n_finished += 1 + lock = _thread.allocate_lock() n_thread = 10 n_finished = 0 |