Shared state Strategies Add bytes dependency Initialize the HashMap On using std::sync::Mutex Update process() Tasks, threads, and contention Holding a MutexGuard acros...
Runtime Tokio runtime Spawning Tasks Runtime In the previous section we explored Futures and Streams which allow us to representa value (in the case of a Future ) or a ser...
Hello World! Creating the stream Writing data Running the client task Running the code Next steps Hello World! To kick off our tour of Tokio, we will start with the obl...
Example: A Chat Server Setup Chat State Line Codec Broadcasting Messages Final Touches Example: A Chat Server We’re going to use what has been covered so far to build a...
Executors Mini Tokio Executors Asynchronous Rust functions return futures. Futures must have poll called on them to advance their state. Futures are composed of other futures...
Getting asynchronous Chaining computations Getting asynchronous Futures are all about managing asynchronicity. Implementing a future thatcompletes asynchonously requires co...
Non-blocking I/O The network resource. Using the resource Registering the resource with the driver Handle::current vs Handle::default The network driver Linking the driver wit...
Borrowing Borrowing When spawning tasks, the spawned async expression must own all of its data. The select! macro does not have this limitation. Each branch’s async expression...