Hub WaitReceive uses round-robin fairness
Platform spec ADR
Hub WaitReceive uses round-robin fairness
Spec standingStandard
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”Multiplexing without language select needs deterministic fairness when one registered channel is always ready.
Decision
Section titled “Decision”| Rule | Detail |
|---|---|
| Homogeneity | `Hub<T>` — homogeneous T only in v1 |
| Scan | Cursor starts at k; scan k, k+1, … modulo registration count for first ready channel |
| After success | Cursor advances past chosen index (wrap) |
| v1 scope | WaitSend out of scope; no language select |
| Empty hub | WaitReceive with zero registrations → HubError::Empty |
Matches D-CORE-CONC-0003.
Consequences
Section titled “Consequences”Runtime hub_wait_receive_* implements rotation; corelib documents registration limits for hot paths.
Verification anchors
Section titled “Verification anchors”Hub builtins; corelib hub tests.