Crust of Rust: async/await
Jon Gjengset Jon Gjengset
80.8K subscribers
178,912 views
0

 Published On Aug 31, 2021

Finally, we tackle the topic of async/await in Rust, and specifically looking at how to use and think about async/await more so than how it works under the hood. My hope with this video is to convey the mental model and intuition you should use when using async/await in your own code, without getting bogged down in the details of Future, Pin, and Wakers.

0:00:00 Introduction
0:04:49 Fixing the video title
0:05:28 What is async fn?
0:10:40 awaiting futures
0:17:00 Yielding
0:20:03 Awaiting one of multiple futures
0:34:46 Cancellation
0:37:58 Executing futures
0:50:50 Select arms with side-effects
0:55:35 Cooperative scheduling
0:58:38 Selects with many arms
1:01:51 Fused futures
1:04:35 Overhead of async
1:07:56 Is select a future?
1:09:20 Awaiting multiple futures
1:19:17 Parallelism and spawning
1:30:37 Sharing across spawn
1:36:23 Runtime discovery
1:42:05 Stack variables in async
1:55:45 Async fn in traits
2:08:06 Asynchronous Mutexes
2:21:03 Do futures stay on a thread?
2:24:11 Async stack traces
2:33:04 Wrapping up

The async book: https://rust-lang.github.io/async-book/
Tokio's mini-redis: https://github.com/tokio-rs/mini-redis/


Live version with chat:    • Crust of Rust: async/await (live vers...  

show more

Share/Embed