We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
← All tracks
0 / 4
Async From First Principles
RustWall 3. With no tokio available the executor lives in your own file, so `Future`, `Waker`, `Pin` and the async state machine stop being magic: you are the runtime.
This track is written for Rust, which isn't the mode you're browsing in.
0
/ 19 solved
· 6 articles
- 1. Why async exists: blocking, threads, and the cost of waiting Read
- 2. Not solved yet. Futures are lazy: nothing happens until you poll
- 3. Not solved yet. The `Future` trait: `Output`, `Poll`, and your first hand-written future
- 4. Not solved yet. `block_on`: the smallest thing that can run a future
- 5. Not solved yet. Countdown futures and the shape of `Pending`
- 6. `Waker` and `Context`: the wakeup contract Read
- 7. Not solved yet. Implementing `Wake`: a real task waker and the lost-wakeup bug
- 8. Not solved yet. `RawWaker` and `RawWakerVTable`: building a `Waker` with unsafe
- 9. What `async fn` actually compiles to Read
- 10. `Pin` and `Unpin`, motivated Read
- 11. Not solved yet. `Unpin` in practice: making `Pin<&mut Self>` usable without unsafe
- 12. Not solved yet. Hand-compile an `async fn` into a state machine
- 13. Not solved yet. `poll_fn`: a future from a closure
- 14. Not solved yet. Hand-rolling `join`: running two futures concurrently
- 15. Not solved yet. Hand-rolling `select`: racing futures and dropping the loser
- 16. Not solved yet. Structural pinning and safe pin projection by hand
- 17. Not solved yet. The minimal single-threaded executor
- 18. Not solved yet. Spawning, `JoinHandle`, and getting values back out
- 19. Not solved yet. A logical-time reactor: timers without a clock
- 20. Not solved yet. Fairness and starvation in your scheduler
- 21. Not solved yet. Cancellation is just: stop polling and drop
- 22. Not solved yet. Cancel safety, blocking, and locks across `.await`
- 23. Not solved yet. Async recursion, async closures, and streams
- 24. How tokio and smol build on these primitives Read
- 25. The function-colouring debate, honestly Read
Check yourself
4 questions · one attempt eachThese do not count toward finishing the track. They are here to catch the things that are easy to read past.
You call a synchronous, CPU-heavy function inside an async fn. What is the consequence?
async fn handler() {
let out = expensive_sync_work(); // 200ms, blocking
...
}
Question 1 of 4