summaryrefslogtreecommitdiff
path: root/docs/esp32/tutorial/intro.rst
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2025-05-23 14:39:37 +1000
committerDamien George <damien@micropython.org>2025-06-04 11:31:12 +1000
commit7f274c7550654160f73b0de8fa73338dc58109a6 (patch)
tree219a9755e531528cd7c1978cb0e97ad76d013d0e /docs/esp32/tutorial/intro.rst
parentb15348415e9d5ad2a978ca38a8da356faee88e91 (diff)
py/scheduler: Only run scheduler callbacks queued before run started.
Without this change, a scheduler callback which itself queues a new callback will have that callback executed as part of the same scheduler run. Where a callback may re-queue itself, this can lead to an infinite loop. With this change, each call to mp_handle_pending() will only service the callbacks which were queued when the scheduler pass started - any callbacks added during the run are serviced on the next mp_handle_pending(). This does mean some interrupts may have higher latency (as callback is deferred until next scheduler run), but the worst-case latency should stay very similar. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'docs/esp32/tutorial/intro.rst')
0 files changed, 0 insertions, 0 deletions