circuitpython/tests/extmod/uasyncio_wait_for.py.exp
Damien George a1afb337d2 extmod/uasyncio: Fix edge case for cancellation of wait_for.
This fixes the cases where the task being waited on finishes just before or
just after the wait_for itself is cancelled.

Fixes issue #8717.

Signed-off-by: Damien George <damien@micropython.org>
2022-06-02 17:14:20 +10:00

63 lines
1012 B
Plaintext

task start 1
task end 1
2
----------
task start 2
timeout
----------
task_catch start
ignore cancel
task_catch done
TimeoutError
----------
task start
ValueError
----------
task start 3
task end 3
6
----------
task start 4
task_cancel_other start
task_cancel_other cancel
CancelledError()
----------
task_wait_for_cancel start
task start 4
task_wait_for_cancel cancelled
----------
task_wait_for_cancel_ignore start
task_catch start
task_wait_for_cancel_ignore cancelled
ignore cancel
task_catch done
----------
task_wait_for_cancel start
cancel wait_for
task start 5
task_wait_for_cancel cancelled
CancelledError()
----------
task_wait_for_cancel start
task start 6
cancel wait_for
task end 6
task_wait_for_cancel cancelled
CancelledError()
----------
task_wait_for_cancel start
task start 7
task end 7
cancel wait_for
task_wait_for_cancel cancelled
CancelledError()
----------
task_wait_for_cancel start
task start 8
task end 8
cancel wait_for
task_wait_for_cancel cancelled
CancelledError()
----------
finish