Concurrency
Structured tasks and direct-style async I/O.
For now, the canonical references are:
docs/concurrency_engine.mdin the repository: current structured concurrency design (tasks, work-stealing scheduler, blocking pool).docs/direct_style_concurrency.md: design notes for the in-progress effects + reactor extension.
Once the implementation lands, this page will cover:
tasks:scopes: opening a structured scope where children can’t outlive the parent.spawn,spawn_blocking,join: starting CPU and blocking work; consuming task handles.parallel_for_chunks: statement-only data-parallel helper for slice workloads.- Effects in signatures: how
suspends,blocking, andoffloads_blockingare declared and checked. - Reactor model: how I/O readiness wakes tasks without splitting the language into async and sync variants.