summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-07-05 17:04:24 +1000
committerDamien George <damien@micropython.org>2024-07-05 17:07:27 +1000
commit633586a7162ea508b472ab5e82a512b38eff370f (patch)
tree5a65453d1ec756bfb97892721319657b335dc9d6
parent4d16a9cced42ad0a298f1be8b993357abe7398ab (diff)
tests/thread/stress_aes.py: Fix logic waiting for finished threads.
Because the main thread executes `thread_entry()` it means there's an additional one added to `count`, so the test must wait for the count to reach `n_thread + 1`. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--tests/thread/stress_aes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/thread/stress_aes.py b/tests/thread/stress_aes.py
index b25da855a..9f4a4e6ae 100644
--- a/tests/thread/stress_aes.py
+++ b/tests/thread/stress_aes.py
@@ -282,6 +282,6 @@ if __name__ == "__main__":
for i in range(n_thread):
_thread.start_new_thread(thread_entry, (n_loop,))
thread_entry(n_loop)
- while count.value < n_thread:
+ while count.value < n_thread + 1:
time.sleep(1)
print("done")