Loading tutorials
Result type with the ? operator. You should also know what a thread is and why programs use several of them. The examples later in the tutorial use Cargo dependencies with feature flags, but this chapter nee2 min readmove, and the Result type. It also assumes you can add tokio with the full feature to Cargo.toml. You will learn the two ways to create a future with syntax: async fn and async blocks.2 min readasync fn and async blocks, and that you know a future is a value that produces its result later. It also assumes you have Tokio set up with the full feature. Here you will learn what .await does, where you can use it, and which mistakes to watch for.2 min readmove, and how to add Tokio to a Cargo project. It also assumes you have seen async fn and .await. Here you will learn why a future does no work until something polls it, and the mistakes that follow from that.2 min readasync fn, how .await works, and that futures are lazy. You should also be comfortable adding dependencies and feature flags in Cargo.2 min readasync fn, use .await, and start a Tokio runtime with #[tokio::main]. It also assumes you have Tokio with the full feature enabled in Cargo.toml.2 min readmove, Result, and the basics of async fn and .await. It also assumes you have Tokio in Cargo.toml with the full feature.2 min readmove, Arc, and the basics of tokio::spawn. It explains the two bounds on tokio::spawn and how to fix the compiler errors they cause.2 min readasync fn, use .await, and start a Tokio runtime. You should also know that a future does nothing until it is polled.2 min readResult, Option, and the ? operator in ordinary Rust. It also assumes you can write an async fn and .await it, and that you have Tokio in Cargo.toml with the "full" feature.2 min readtokio::spawn), why spawned tasks need Send and 'static, and how Arc and move closures work. Tasks often need to talk to each other or share data. Tokio gives you two tools: channels for passing messages and Mutex for shared state.2 min readasync fn, use .await, and start tasks with tokio::spawn. It also assumes you know that Tokio runs many tasks on a small pool of worker threads.2 min readDrop, can write async fn and .await, and have used tokio::spawn, timeout, and select!. Here you will learn how a future is cancelled, what that means for your code, and how to write code that survives it.2 min readFuture trait and Poll from earlier chapters, plus basic threads and Arc. It explains what happens after a future returns Poll::Pending.2 min readFuture trait with poll. It explains why poll takes Pin<&mut Self> and what Unpin means.2 min readFuture and Poll work, what .await does, and the basics of Pin. Here you will see what the compiler builds from an async fn, and why that explains several behaviors you have already met.2 min readasync fn, .await, and Tokio basics from earlier chapters, plus ordinary Iterator use.2 min readasync fn, .await, and tokio::spawn with its Send and 'static requirements.2 min read