2min chapter

 Rustacean Station  cover image

Tokio with Carl Lerche

Rustacean Station

CHAPTER

The Differences Between Green Threads and Async Rust

With Async Rust, you have the concept of a task and that is similar in idea to a thread or to a co-routine. But with Async await, you can write your logic in a like step-by-step one like kind of way. The compiler at compile time it will take that kind of almost synchronous logic and rewrite it to be a state machine. Like once it's compiled to the state machine, then Tokyo or any other AC runtime can take all of these tasks and the scheduler can execute them on a single thread.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode