Channel default capacity is unbounded
Platform spec ADR
Channel default capacity is unbounded
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”Authors need predictable queue semantics without implicit blocking on the default channel.
Decision
Section titled “Decision”| Rule | Detail |
|---|---|
| Default | Unbounded when ChannelOptions is omitted or no bounded capacity is set |
| Bounded | ChannelOptions.Bounded(n) with `n > 0` |
| Unbounded | ChannelOptions.Unbounded (equivalent to default) |
| Factory | `Channel<T>.Create(options: ChannelOptions = default)` |
Consequences
Section titled “Consequences”Documentation must warn about memory growth on unbounded channels. Bounded queues park senders when full.
Verification anchors
Section titled “Verification anchors”Corelib concurrency tests; runtime channel builtins.