Skip to content

Release 1.1.0

Choose a tag to compare

@simonl65 simonl65 released this 05 Aug 09:48
· 9 commits to main since this release

Major (breaking changes)

  • None.

Minor (functionality added in a backward compatible manner)

  • Task now accepts an isolate_errors parameter (default True). When enabled, exceptions thrown by a task's callback are caught and stashed on task.last_exception instead of propagating — one failing task no longer halts the round or prevents subsequent tasks from running. Pass isolate_errors=False to restore the old raise-on-error behaviour for critical tasks.
  • Task.last_ms now defaults to ticks_ms() at construction time rather than 0. A task created after uptime has advanced is no longer treated as overdue since boot, preventing an immediate burst of callbacks on startup.
  • light_sleep mode now sleeps for exactly the soonest task's remaining time each round (via _ms_until_next_due) rather than a fixed per-call minimum, improving power savings and scheduling accuracy.
  • __init__.py exports updated to use explicit as re-exports (Task as Task, run as run) for better static analysis and type-checker compatibility.

Patch (backward compatible bug fixes)

  • Generator-based example corrected to build the scheduler once outside the loop rather than once per iteration.
  • Improved test suite with real ticks_diff wraparound math and per-behaviour test cases.