Share State via Channels in concurrent Programs | Advanced Rust Part 4

Опубликовано: 30 Март 2026
на канале: Green Tea Coding
4,343
223

Watch the rest of this series:    • Advanced Rust  
New to Rust? Check out my fundamentals series:
   • How to become a Rust Developer  

"Share memory by communicating, don't communicate via shared memory". This is the core concept behind safe and efficient concurrency in Rust. We explore asynchronous and synchronous channels, how to send and receive data. By design, and in cooperation with the ownership system, using channels makes it easy to avoid data races. #rustlang #coding #threads

Find me elsewhere:
🐘 Mastodon: https://mastodon.social/@GreenTeaCoding

0:00 Intro
0:53 Channel basics
4:00 Blocking receive
4:40 Non-blocking receive
6:10 Receive with timeout
7:47 Receive iterator
9:36 Multiple senders
10:56 Asynchronous unbounded channel
12:36 Synchronous bounded channel
13:59 Rendezvous channel
14:40 Async vs. sync channel
15:46 Usage example with file-io
20:27 Wrap-up