Async Rust in Three Parts
BRANK

↫ Home2024 October 23Async/await, or "async IO", is a new-ish​Rust added async/await in 2019. For comparison, C# added it in 2012, Python in 2015, JS in 2017, and C++ in 2020. language feature that lets our programs do more than one thing at a time. It's sort of an alternative to multithreading, though Rust programs often use both. Async is popular with websites and network services that handle many connections at once,​"Many" here conventionally means ten thousand or more. This is sometimes called the "C10K problem", short for 10,000 clients or connections. because running lots of "futures" or "tasks" is more efficient than running lots of threads.This series is an introduction to futures, tasks, and async IO in Rust. Our goal will be to get a good look at the machinery, so that async code doesn't feel like magic. We'll start by translating ("desugaring") async examples into ordinary Rust, and gradually we'll build our own async "runtime".​For now, a "runtime" is a library or fra…

jacko.io
Related Topics: Rust