summaryrefslogtreecommitdiff
path: root/tests/thread/stress_recurse.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/thread/stress_recurse.py')
-rw-r--r--tests/thread/stress_recurse.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/thread/stress_recurse.py b/tests/thread/stress_recurse.py
index 8edee246a..b7a128821 100644
--- a/tests/thread/stress_recurse.py
+++ b/tests/thread/stress_recurse.py
@@ -6,17 +6,20 @@
import _thread
+
def foo():
foo()
+
def thread_entry():
try:
foo()
except RuntimeError:
- print('RuntimeError')
+ print("RuntimeError")
global finished
finished = True
+
finished = False
_thread.start_new_thread(thread_entry, ())
@@ -24,4 +27,4 @@ _thread.start_new_thread(thread_entry, ())
# busy wait for thread to finish
while not finished:
pass
-print('done')
+print("done")