-
Notifications
You must be signed in to change notification settings - Fork 2
feat: implement ZEP-0002 Phase 1 fiber runtime and work-stealing scheduler #4
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestpriority:p0Highest priorityHighest prioritystatus:blockedWork item is blocked by dependencyWork item is blocked by dependencystatus:in-progressWork item is actively being worked onWork item is actively being worked on
Description
Summary
Implement the runtime substrate for ZEP-0002 Structured Async: fibers plus the work-stealing thread pool they run on.
Scope
- Fiber context switching abstraction for Linux, macOS, and Windows
- Runtime initialization/deinitialization API for thread-pool setup
- One worker thread per logical CPU by default, configurable via runtime config /
ZAG_THREADS - Local run queues plus stealing strategy for idle workers
- Fiber lifecycle, stack allocation/growth strategy, and failure handling
- Minimal internal tracing/metrics hooks needed for validation
Acceptance criteria
- Runtime boots and shuts down cleanly on supported host platforms
- Fibers can be scheduled, parked, resumed, and completed without leaking memory
- Idle workers can steal runnable work from other workers
- Default thread count and explicit override both work
- Design constraints in ZEP-0002 Implementation Notes are reflected in code and docs
References
- ZEP-0002 Phase 1 and Done Criteria
docs/zep/ZEP-0002-async-structure.mddocs/adr/ADR-0002-beam-concurrency-gap-analysis.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpriority:p0Highest priorityHighest prioritystatus:blockedWork item is blocked by dependencyWork item is blocked by dependencystatus:in-progressWork item is actively being worked onWork item is actively being worked on