← findnix.eu
🎬 video.infosec.exchange video.infosec.exchange

Rust 101 - 36: What async and await really do

⏱ 22:57 🌐 video.infosec.exchange

Attempting to explain as slowly as possible what actually happens when the compiler finds an `async` function containing `awaits`: it writes a `poll` method for you to create something that implements `Future`. The generated `poll` method polls the `Future`s you asked to `await`, in order. The interesting bit is that this generated thing that implements `Future` and has a `poll` method needs to own the things it refers to, which is what leads to some of the most confusing error messages you see when writing this kind of code. Links: * Exercises: https://artificialworlds.net/presentations/rust-101/exercises/E-async-web/mod.html * Slides: https://artificialworlds.net/presentations/rust-101/E-async-web Rust 101 is a series of videos explaining how to write programs in Rust. The course materials for this series are developed by tweede golf. You can find more information at https://github.com/tweedegolf/101-rs and you can sponsor the work at https://github.com/sponsors/tweedegolf . They a

β†—https://video.infosec.exchange/w/9LZ2PjR3MNWzj6DY3KLAML
async programming rust
Indexiert von findnix.eu Β· Eigene Seite einreichen