Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

structured concurrency

Making sure every task a function starts is finished or cancelled before the function returns.

Structured concurrency ties task lifetimes to a scope (join!, JoinSet dropped at scope end aborts its tasks), so no work outlives the code that started it.

Loading interactive…

Examples

  • tokio::join!(quote(300, ..), quote(200, ..), quote(100, ..)) returns only after all three finish, in 300 ms rather than the 600 ms of awaiting them in turn.

  • Dropping a JoinSet aborts every task still in it, so no task outlives the function that owns the set.

Read the full section →