summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/asyncio_wait_for_linked_task.py
Commit message (Collapse)AuthorAge
* extmod/asyncio: Fix early exit of asyncio scheduler.Yoctopuce dev2025-05-07
This commit fixes three open issues related to the asyncio scheduler exiting prematurely when the main task queue is empty, in cases where CPython would not exit (for example, because the main task is not done because it's on a different queue). In the first case, the scheduler exits because running a task via `run_until_complete` did not schedule any dependent tasks. In the other two cases, the scheduler exits because the tasks are queued in an event queue. Tests have been added which reproduce the original issues. These test cases document the unauthorized use of `Event.set()` from a soft IRQ, and are skipped in unsupported environments (webassembly and native emitter). Fixes issues #16759, #16569 and #16318. Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>