Concurrency¶
Wait for I/O without blocking, run CPU work in parallel, and keep every piece of concurrent work owned by a scope.
- Async / AwaitWrite work that waits without blocking, using futures and
await. - TasksRun CPU work in parallel on runtime workers.
- Structured concurrencyOwn concurrent work with
Task.scopeso nothing outlives its parent. - Task cancellationGive long-running work a way to stop cleanly.
- Task sharingShare values between tasks and protect changes with locks.
- Task poolsReuse a fixed set of workers for parallel CPU jobs.