rust_book/ch17/async-await.md

421 B

Async and Await Notes

let data = fetch_data_from(url).await;
println!("{data}");

Parallelism and Concurrency

Concurrency: When an individual works on several different tasks before any of them is complete. When get bored with one project, just switch to another task.

Parallelism: Split up a group of tasks between the people on the team with each person taking one task and working on it alone.