summaryrefslogtreecommitdiffstatshomepage
path: root/tests/thread/thread_lock4.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/thread/thread_lock4.py')
-rw-r--r--tests/thread/thread_lock4.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/thread/thread_lock4.py b/tests/thread/thread_lock4.py
index d77aa24ee8..2f9d42d6b5 100644
--- a/tests/thread/thread_lock4.py
+++ b/tests/thread/thread_lock4.py
@@ -2,6 +2,10 @@
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
+try:
+ import utime as time
+except ImportError:
+ import time
import _thread
def fac(n):
@@ -39,6 +43,7 @@ while True:
with jobs_lock:
if len(output) == n_jobs:
break
+ time.sleep(1)
# sort and print the results
output.sort(key=lambda x: x[0])