mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-05-16 02:08:45 +00:00
- Remove confusing use of atomics. Use return values of async tasks instead, to ensure all tasks are awaited. - Remove use of `println!()`, which uses a global lock and cannot be executed in parallel.
Async
Asynchronous programming is a model where tasks are delegated to a runtime that executes them concurrently. It is particularly efficient for applications where many independent IO-operations are performed, e.g. web servers.
Rust provides the necessary primitives to do asynchronous programming in the language.
However, Rust's standard library does not include a runtime.
For these exercises, we will use the mainstream runtime called tokio.