summaryrefslogtreecommitdiff
path: root/tests/thread/thread_lock3.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/thread/thread_lock3.py')
-rw-r--r--tests/thread/thread_lock3.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/thread/thread_lock3.py b/tests/thread/thread_lock3.py
index a927dc682..c5acfa21b 100644
--- a/tests/thread/thread_lock3.py
+++ b/tests/thread/thread_lock3.py
@@ -2,6 +2,7 @@
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+import time
import _thread
lock = _thread.allocate_lock()
@@ -26,4 +27,4 @@ for i in range(n_thread):
# busy wait for threads to finish
while n_finished < n_thread:
- pass
+ time.sleep(0)