Repository navigation
I compiled an interactive 14-chapter architecture book for Tokio with permanent commit-line anchors #8606
Unanswered
maleRjc
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone! 👋
Like many Rustaceans, I spent a lot of time trying to wrap my head around Tokio's internal mechanics—from
Future/WakerandContext, down to the multi-threaded work-stealing scheduler, the epoll/kqueue reactor driver, and cooperative budget management.To help myself and fellow newcomers really understand what's happening under the hood, I created a free, self-contained interactive architecture book based on Tokio's codebase:
📖 Read online (free & zero server dependencies):
What's inside:
Future,Waker, and executor.Builderputs together the driver, scheduler, and worker thread pool.tokio::spawn-> scheduling queue ->pollloop -> Waker notification loop.mio::Pollintegrates withepolland how timers/sleep are handled without busy-waiting.Mutex,Semaphore, and channels park and unpark tasks.tokio::coop) avoids scheduler starvation.Key features:
[FACT:path:line]): Every architectural assertion in the book links directly to the exact file and lines in the immutable commit of Tokio's repo, so you can verify the explanation against the actual source code side-by-side.I'd love to hear your thoughts, feedback, or any corrections if some of the deeper scheduler or driver details could be explained more accurately!
All reactions