Decrusting the tokio crate

preview_player
Показать описание


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

Рекомендации по теме
Комментарии
Автор

I have been writing code since I was a wee little eleven year old boy, now going on almost 30 years and time and again I am humbled and learn new something new with each video of yours! These are truly gems Jon!

christsciple
Автор

Dude, the level of depth you go into is so far beyond anyone else in this space. Seriously, you're an animal!

brendanwenzel
Автор

The "Async in depth" entry in the tokio tutorials is also a really nice read!
I didn't really understand the whole waker thing before reading that.

oof-software
Автор

My dude delivered quality content again! Thank you sir. Please continue with the series.

sbx
Автор

the tokio::pain!() (instead of pin) typo is just *chef_kiss*

felixcantournet
Автор

As always, thank you so very much for putting the time into these videos. I've written tons of code with tokio and still managed to absorb some new thoughts and concepts. Maybe an idea for a future crust of rust might be an implementation of an async executor. Although, I'm not sure if it is a large endeavor, or a bit too deep in the weeds.

I love that these videos are not step by step tutorials but rather a tutorial on how someone could arrive at an implementation. It's patterns instead of recipes.

christopher
Автор

thanks for this stream, just finished the riust book a few days back and wanted to learn about async programming in rust in depth . this is invaluable !!!

sagnikc
Автор

3:08:52 Regarding inefficiency of processing data one by one with `mpsc` instead of doing it in batches (in a form of e.g. `Mutex<Vec<T>>`) I believe methods `mpsc::Receiver::recv_many` and `poll_recv_many` have been created to solve exactly this problem.

pwalski
Автор

Would love an episode dedicated to tokio channels and async synchronization of a multi threaded tokio program.

aliakbarmostafaei
Автор

I watched 3 hours of this late at night after it appeared from autoplay, idk what you were saying but it was good background noise 8/10

jahsehisntdead
Автор

Just today I was thinking "Hmm, is there a 'Decrusting Tokio'?". Great!

burgerkingfor
Автор

Jon is a rust beast, incredibly skilled you rock

bouraouiyacine
Автор

If I am not mistaken regarding select and why you can not pass future.await in select "arms" is that .await is simply instruction to await for the future and it should actually prevent from progressing the function body further. So that's why you need to pass a future and select will handle all of the "polling" tasks on it's own

АртемФедоров-юб
Автор

1:04:39 I don't know if it's been addressed later on, but there's definitely a difference between Tokio Instant and std Instant. In if the testing feature is enabled, Tokio Instant works off an internal clock so Tokio can time warp through sleep calls so tests don't take forever.

gfasterOS
Автор

At 45:14 - 48:00 you talk about shutdown, and unless I misunderstood the documentation you make incorrect statements.
for instance:
when the main future exits, the OS does NOT immediately shut down all the threads -
from the docs:
'Tasks spawned through Runtime::spawn keep running until they yield. Then they are dropped. They are not guaranteed to run to completion, but might do so if they do not yield until completion.

Blocking functions spawned through Runtime::spawn_blocking keep running until they return.

The thread initiating the shutdown blocks until all spawned work has been stopped. This can take an indefinite amount of time. The Drop implementation waits forever for this.'
also, shutdown_background & shutdown_timeout do NOT shutdown gracefully.

AmosRothberg
Автор

Hey, excited to watch the video! You mentioned your discord server and said the link outloud but a link in the description you could click would be super nice!

Fyyro
Автор

Does anyone know if there's something similar to this channel for Golang? The quality of learning material for Rust is just extraordinary

cappuccinopapi
Автор

So excited to watch this brilliant video, thanks Jon

rasoulmesghali
Автор

That watch channel seems useful. In fact, after watching your video about channels, I implemented a sync version of exactly that idea (never published). It makes sense to just look into these modules to get to know the tools available. I guess I should do that more often :)

flyingsquirrel
Автор

At #2:00:34, what does it mean "whoever reads it first has it" talking about Receiver of mpsc? there is just one receiver, there is no second or third receiver.

LB-mfbs