Futures in Rust 130 What is a future? A future is a representation of some operation that will be completed in the future. Async in Rust uses a poll-based approach in which an asynchronous task will have three phases: 1. The poll phase : A future is polled, which results in the task progressing until a point where it can no longer make progress. We often refer to the part of the runtime that polls a future as an executor. 2. The wait phase : An event source, most often referred to as a reactor, registers that a future is waiting for an event to happen and makes sure that it will wake the future when that event is ready. 3. The wake phase : The event happens and the future is woken up. It's now up to the executor that polled the future in step 1 to schedule the future to be polled again and make further progress until it completes or reaches a new point where it can't make further progress and the cycle repeats. Now, when we talk about futures, I find it useful to make a distinction between non-leaf futures and leaf futures early on because, in practice, they're pretty different from one another. Leaf futures Runtimes create leaf futures, which represent a resource such as a socket. This is an example of a leaf future: let mut stream = tokio::net::Tcp Stream::connect("127. 0. 0. 1:3000"); Operations on these resources, such as a reading from a socket, will be non-blocking and return a future, which we call a leaf future since it's the future that we're actually waiting on. It's unlikely that you'll implement a leaf future yourself unless you're writing a runtime, but we'll go through how they're constructed in this book as well. It's also unlikely that you'll pass a leaf future to a runtime and run it to completion alone, as you'll understand by reading the next paragraph. Non-leaf futures Non-leaf futures are the kind of futures we as users of a runtime write ourselves using the async keyword to create a task that can be run on the executor. The bulk of an async program will consist of non-leaf futures, which are a kind of pause-able computation. This is an important distinction since these futures represent a set of operations. Often, such a task will await a leaf future as one of many operations to complete the task.