![Page 1: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/1.jpg)
The Talk you’ve been .await-ing for@steveklabnik
![Page 2: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/2.jpg)
![Page 3: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/3.jpg)
![Page 4: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/4.jpg)
![Page 5: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/5.jpg)
async fn foo(s: String) -> i32 { // …}
fn foo(s: String) -> impl Future<Output=i32> { // …}
![Page 6: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/6.jpg)
Stuff we’re going to talk about
● async/await and Futures● Generators: the secret sauce● Tasks, Executors, & Reactors, oh my!● … maybe async fn in traits
![Page 7: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/7.jpg)
async/await and Futures
![Page 8: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/8.jpg)
![Page 9: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/9.jpg)
![Page 10: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/10.jpg)
![Page 11: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/11.jpg)
![Page 12: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/12.jpg)
![Page 13: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/13.jpg)
Async/await is simpler syntax for Futures
![Page 14: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/14.jpg)
Async/await is simpler syntax for Futures*
![Page 15: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/15.jpg)
A Future represents a value that will exist sometime in the future
![Page 16: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/16.jpg)
Let’s build a future!
![Page 17: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/17.jpg)
A timer future
● Mutex around a boolean● Spins up a new thread that sleeps for some
amount of time● When the thread wakes up, it sets the boolean to
true and ‘wakes up’ the future● Calls to poll check the boolean to see if we’re
done
![Page 18: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/18.jpg)
![Page 19: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/19.jpg)
![Page 20: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/20.jpg)
![Page 21: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/21.jpg)
![Page 22: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/22.jpg)
Four rulesFor using async/await
![Page 23: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/23.jpg)
async fn foo(s: String) -> i32 { // …}
fn foo(s: String) -> impl Future<Output=i32> { // …}
![Page 24: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/24.jpg)
If you have a Future<Output=i32> and you want an i32, use
.await on it
![Page 25: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/25.jpg)
You can only .await inside of an async fn or
block
![Page 26: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/26.jpg)
To start executing a Future, you pass it to an
executor
![Page 27: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/27.jpg)
![Page 28: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/28.jpg)
![Page 29: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/29.jpg)
![Page 30: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/30.jpg)
Generators aka stackless coroutines
![Page 31: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/31.jpg)
Generators are not stable
… yet
![Page 32: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/32.jpg)
![Page 33: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/33.jpg)
![Page 34: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/34.jpg)
![Page 35: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/35.jpg)
Futures need to have poll() called over and over until a value is produced
Generators let you call yield over and over to get values
async/await is a simpler syntax for a generator that implements the Future trait
![Page 36: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/36.jpg)
Tasks, Executors, & Reactors
![Page 37: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/37.jpg)
“The event loop”
![Page 38: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/38.jpg)
Task: a unit of work to execute, a chain of Futures
Executor: schedules tasks
Reactor: notifies the executor that tasks are ready to execute
![Page 39: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/39.jpg)
Interface to the reactor
Executor calls poll, and provides a context
![Page 40: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/40.jpg)
Let’s build an executor!
![Page 41: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/41.jpg)
async fn foo() { // …}
![Page 42: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/42.jpg)
async fn foo() { // …}
spawner.spawn(foo())
![Page 43: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/43.jpg)
async fn foo() { // …}
spawner.spawn(foo())
Executortask queue
![Page 44: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/44.jpg)
async fn foo() { // …}
spawner.spawn(foo())
Executortask queue
Calls poll() on the Future
![Page 45: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/45.jpg)
async fn foo() { // …}
spawner.spawn(foo())
Executortask queue
Calls poll() on the Future
![Page 46: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/46.jpg)
async fn foo() { // …}
spawner.spawn(foo())
Executortask queue
Calls poll() on the Future
Future calls wake() (reactor)
![Page 47: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/47.jpg)
async fn foo() { // …}
spawner.spawn(foo())
Executortask queue
Calls poll() on the Future
Future calls wake() (reactor)
![Page 48: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/48.jpg)
![Page 49: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/49.jpg)
![Page 50: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/50.jpg)
![Page 51: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/51.jpg)
![Page 52: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/52.jpg)
![Page 53: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/53.jpg)
![Page 54: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/54.jpg)
A quick aside about Pin<P>
![Page 55: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/55.jpg)
Before a future starts executing, we need to be able to move it around in memory.
(For example, to create a task out of it, we need to move it to the heap)
Once a future starts executing, it must not move in memory.
(otherwise, borrows in the body of the future would become invalid)
![Page 56: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/56.jpg)
When you turn some sort of pointer type into a Pin<P>, you’re promising that what the pointer to will no longer move.
Box<T> turns into Pin<Box<T>>
There’s an extra trait, “Unpin”, that says “I don’t care about this”, similar to how Copy says “I don’t care about move semantics.
![Page 57: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/57.jpg)
Let’s build a reactor!
![Page 58: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/58.jpg)
(We’re not gonna build a reactor)
![Page 59: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/59.jpg)
(We technically did build a reactor)
![Page 60: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/60.jpg)
Bonus round: async fn in traits
![Page 61: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/61.jpg)
![Page 62: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/62.jpg)
A function is only one function
A trait is implemented for many types, and so
is many functions
![Page 63: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/63.jpg)
![Page 64: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/64.jpg)
![Page 65: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/65.jpg)
It gets way more complicated
![Page 66: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/66.jpg)
![Page 67: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/67.jpg)
![Page 68: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/68.jpg)
![Page 69: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/69.jpg)
It gets way way way more complicated
![Page 70: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/70.jpg)
![Page 71: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/71.jpg)
![Page 72: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/72.jpg)
![Page 73: The Talk you’ve been .await-ing for€¦ · Async/await is simpler syntax for Futures* A Future represents a value that will exist sometime in the future. Let’s build a future!](https://reader035.vdocuments.us/reader035/viewer/2022070107/6022c9abfe4381250e3eebbd/html5/thumbnails/73.jpg)
Thanks!@steveklabnik
● https://rust-lang.github.io/async-book
● https://tmandry.gitlab.io/blog/posts/optimizing-await-1/
● https://smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-hard/