Main fiber and process shutdown
Platform spec ADR
Main fiber and process shutdown
Spec standingStandard
- Concurrency package - Contracts and edge cases Send, Receive, Join, Cancel, and Hub normative contracts.
- Concurrency package - Decisions record (legacy index) Migration index pointing to per-decision ADR files under adr/—normative text lives in ADRs, not this page.
- Concurrency package - Design model Package layout, module map, and thin-wrapper rule for Fiber and Channel structs.
- Concurrency package - Examples Illustrative spawn, Channel, and Hub usage (informative).
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Context
Section titled “Context”Process lifetime must be defined when main returns while child fibers still run.
Decision
Section titled “Decision”| Rule | Detail |
|---|---|
| Main | main() runs on fiber 0 |
| Shutdown | When main returns, runtime Joins spawned fibers that were not Detached |
| Detach | Detach waives parent Join; child panic still aborts process |
| Leak | Spawn without Join or Detach before main ends → conformance warning in v0.2 tests |
Consequences
Section titled “Consequences”Future recovery policies require a new ADR; v1 aborts on undetached child panic.
Verification anchors
Section titled “Verification anchors”Runtime shutdown tests; conformance warnings catalog.