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>
This commit is contained in:
@@ -282,6 +282,6 @@ if __name__ == "__main__":
|
|||||||
for i in range(n_thread):
|
for i in range(n_thread):
|
||||||
_thread.start_new_thread(thread_entry, (n_loop,))
|
_thread.start_new_thread(thread_entry, (n_loop,))
|
||||||
thread_entry(n_loop)
|
thread_entry(n_loop)
|
||||||
while count.value < n_thread:
|
while count.value < n_thread + 1:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
print("done")
|
print("done")
|
||||||
|
|||||||
Reference in New Issue
Block a user