This commit is contained in:
2026-03-24 13:40:41 +00:00
parent 49025b1055
commit 70c5e08d66
3 changed files with 136 additions and 38 deletions
-38
View File
@@ -1,41 +1,3 @@
# PR-7.2 — Deterministic Scheduler Core
## Briefing
Implement a cooperative deterministic scheduler.
## Target
Scheduler structure inside VM:
* `ready_queue: VecDeque<HeapRef>`
* `sleeping: Vec<HeapRef>` (sorted or scanned by wake_tick)
* `current: Option<HeapRef>`
Policy:
* FIFO for ready coroutines.
* Sleeping coroutines move to ready when `wake_tick <= current_tick`.
No execution switching yet.
## Checklist
* [ ] Scheduler struct exists.
* [ ] Deterministic FIFO behavior.
* [ ] No randomness.
## Tests
* Enqueue 3 coroutines and ensure dequeue order stable.
## Junie Rules
You MAY add scheduler struct.
You MUST NOT implement SPAWN/YIELD/SLEEP yet.
---
# PR-7.3 — SPAWN Instruction
## Briefing