spawn keyword; async and await reserved
Platform spec ADR
spawn keyword; async and await reserved
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”Aligns with inception ADR D-INC-0008; avoids dual concurrency models in v1.
Decision
Section titled “Decision”| Rule | Detail |
|---|---|
| Keyword | spawn required for new fibers; no go alias in v1 |
| Reserved | async and await are parse errors (reserved, not implemented) |
| Data transfer | Channel only between fibers for data; Mutex / WaitGroup for coordination |
| Handles | `Fiber<T>` and `Channel<T>` are move-only |
Consequences
Section titled “Consequences”Parser and semantic tests reject async/await; spawn lowering returns `Fiber<T>`.
Verification anchors
Section titled “Verification anchors”Parser fixtures; Fibers and spawn.