Skip to content

refactor!: simplify task state and PID registry - #34

Merged
MikiEEE merged 4 commits into
masterfrom
develop
Aug 22, 2026
Merged

refactor!: simplify task state and PID registry#34
MikiEEE merged 4 commits into
masterfrom
develop

Conversation

@MikiEEE

@MikiEEE MikiEEE commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • remove the deprecated TaskState container and its stale lifecycle mirror
  • make SmallTask fields and scheduler-owned wait registrations the single source of task lifecycle truth
  • replace the PID-sorted task list and duplicate used-PID set with one PID-to-task dictionary and bounded allocation cursor
  • preserve priority FIFO scheduling, front-resume behavior, deterministic PID-ordered snapshots, and the sleeping-task heap
  • reject stale ready and sleeping entries by task identity after PID reuse

Breaking changes

  • SmallPackage.TaskState has been removed
  • SmallTask.state has been removed
  • state_blob parameters have been removed from sleep, wait_signal, and sigSuspendV2

The breaking title intentionally selects a major semantic-version release from the current v1.1.0 baseline.

Validation

  • PR refactor(runtime): remove TaskState #32 passed static typing, CPython 3.10-3.13 tests, coverage, and distribution verification
  • PR refactor(scheduler): replace sorted PID registry #33 passed static typing, CPython 3.10-3.13 tests, coverage, and distribution verification
  • focused scheduler coverage includes priority/FIFO/front ordering, capacity exhaustion, PID reuse, invalid priorities, queued deletion, stale sleeping entries, watcher accounting, and deterministic listing order
  • release-policy title validation passed locally

Included work

Follow-up

  • run real-device MicroPython heap and scheduler measurements when supported hardware is available
  • audit the separate SmallIO deque constructor for the same MicroPython compatibility concern

@MikiEEE
MikiEEE merged commit 977649a into master Aug 22, 2026
16 checks passed
MikiEEE added a commit that referenced this pull request Aug 23, 2026
refactor!: simplify task state and PID registry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant