From 1ec748d1dff7d0fabcc700140b34566c953d3399 Mon Sep 17 00:00:00 2001 From: Peter Hinch Date: Mon, 11 Jun 2018 08:37:55 +0100 Subject: [PATCH] tests/README.md Add note on scheduling. --- uasyncio_iostream/tests/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/uasyncio_iostream/tests/README.md b/uasyncio_iostream/tests/README.md index f766082..dcd4395 100644 --- a/uasyncio_iostream/tests/README.md +++ b/uasyncio_iostream/tests/README.md @@ -16,3 +16,13 @@ iotest.py Measure timing of I/O scheduling with a scope. auart.py Run a loopback test on a physical UART. auart_hd.py Simulate a pair of devices running a half-duplex protocol over a pair of UARTs. + +# Note on I/O scheduling + +Examination of the code, along with running iotest.py, demonstrates that I/O +polling does not take place as frequently as it could. In the presence of coros +which issue `yield asyncio.sleep(0)` polling occurs when all such coros have +run. + +An option is to modify `core.py` to schedule I/O after each coro has run - the +drawback being a reduced rate at which these round-robin tasks are scheduled.