Skip to content

Commit 633586a

Browse files
committed
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 <[email protected]>
1 parent 4d16a9c commit 633586a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: tests/thread/stress_aes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,6 @@ def thread_entry(n_loop):
282282
for i in range(n_thread):
283283
_thread.start_new_thread(thread_entry, (n_loop,))
284284
thread_entry(n_loop)
285-
while count.value < n_thread:
285+
while count.value < n_thread + 1:
286286
time.sleep(1)
287287
print("done")

0 commit comments

Comments
 (0)