Skip to content

mpy-scheduler v1.2.2

Choose a tag to compare

@simonl65 simonl65 released this 26 Aug 16:17
· 2 commits to main since this release

mpy-scheduler 1.2.2 — 2026-08-26

Major (breaking changes)

  • None.

Minor (functionality added in a backward compatible manner)

  • None.

Patch (backward compatible bug fixes)

  • Optimized run()'s per-round hot loop: ticks_ms/ticks_diff are now hoisted to locals instead of looked up via module attribute access every task every round, and each task's interval_ms is read once per round instead of twice. Measured +5.76% loop rate on RP2040/armv6m hardware, with no change to run()'s signature, yielded value, or Task's public surface.
  • Documented and enforced that interval_ms is read once per task per round: a callback that mutates its own task.interval_ms mid-round can no longer affect that same round's due check or its contribution to the yielded periodic-fire count — only later rounds. This was already the intended contract (intervals are meant to be fixed at construction); it is now explicit and covered by a regression test.
  • Fixed an issue where release testing caught a CPython import error: "ModuleNotFoundError: No module named 'utime'", now shimmed in a try/catch.