MENU

Fun & Interesting

Decrusting the tokio crate

Jon Gjengset 151,979 10 months ago
Video Not Working? Fix It Now

In this stream, we peeled back the crust on the tokio crate — https://github.com/tokio-rs/tokio/ — and explored its interface, structure, and mechanisms. We talked about blocking, cancellation, spawning, and mechanisms for synchronization. We also dug into some of what goes on under the hood where that ends up being relevant to you as an application author! For more details about tokio, see https://docs.rs/tokio/. Discord: https://discord.jonhoo.eu 0:00:00 Introduction 0:02:28 The parts of tokio 0:05:19 The tokio runtime 0:29:08 Blocking 0:48:09 Send bounds and LocalSet 0:51:04 tokio vs std Mutex 0:56:53 Runtime questions 1:06:00 tokio resources 1:28:19 tokio::fs nuances 1:33:47 tokio::process nuances 1:36:27 tokio::io things 1:47:30 tokio-stream 1:56:13 tokio::sync 2:11:10 tokio::task::JoinSet 2:19:13 tokio::select! and cancellation 2:51:26 tokio-util and CancellationToken 3:03:35 common errors: tokio::spawn 3:07:25 common errors: concurrency vs parallelism 3:08:53 common errors: mpsc fan-in 3:12:08 Follow-up questions and outro Live version with chat: https://youtube.com/live/YlTyZvpaywQ

Comment