Message Passing With Rust MPSC Channels 🦀 Rust Tutorial

  Рет қаралды 6,605

Trevor Sullivan

Trevor Sullivan

Күн бұрын

Пікірлер: 27
@priyanshu4016
@priyanshu4016 3 ай бұрын
i have never saw such easy and clean explaination for rust tutorial , Great to watch your content thanks
@MartinBarton-f2u
@MartinBarton-f2u 6 ай бұрын
Thank you for awesome tutorials it really helps me a lot ! But I think there is a better way of demonstration. In your example (the final code) first you send 6 messages to the channel and after that you spawn the receiver thread. So you instantly receive all messages. If you move spawning of receiver thread before sending messages without .join() you will see desired "communication" better.
@ChidleyITCompute
@ChidleyITCompute 10 ай бұрын
Concurrent and parallel programming is a key skill because computers can only boost their performance by adding more cores. This means that programmers need to know how to write code that can run on multiple cores simultaneously and efficiently. I think that rust is probably the best programming language for this. Thank you for these last few videos.
@TrevorSullivan
@TrevorSullivan 10 ай бұрын
Yes, Rust is an amazing language for performance! It's very efficient with CPU and memory resources. Thank you for your continued support! 😊❤️🦀
@jmsdnns
@jmsdnns Жыл бұрын
I have been watching all of your videos in the Rust series and just wanted to say that they're fantastic! I appreciate how much time you're putting in. I've been coding over 20 years, but I am new to Rust, so I appreciate very much that you are to the point and that you don't assume we're all beginner programmers. Thank you!
@Ch4h1d
@Ch4h1d 4 ай бұрын
Im an embeddded dev trying to switch to rust..... love your vids
@TrevorSullivan
@TrevorSullivan 4 ай бұрын
@@Ch4h1d Rust is an amazing choice! 🦀 Thank you for your kind comment. 😊
@farzadmf
@farzadmf Жыл бұрын
GREAT video (like the others); you're doing an amazing job with these tutorials. I must say: doing this in Go feels SUPER natural and smooth, and comparing the amount of work that needs to be done to achieve something similar in Rust seems wayyyy more complicated and involved
@TrevorSullivan
@TrevorSullivan Жыл бұрын
Thanks for your kind words! You're definitely right that not everything is straightforward in Rust, but it does give you granular control. The way that errors are handled in Rust and Go is also very different. Both languages have excellent performance, so it's a matter of picking the tool that works best for you! Rust on!! 🦀
@sohansingh2022
@sohansingh2022 4 ай бұрын
Beautiful!
@MiesvanderLippe
@MiesvanderLippe 3 ай бұрын
Why do you not use if let Some / match patterns for the results? Or just pretty print the thing result?
@TrevorSullivan
@TrevorSullivan 3 ай бұрын
Personally I find the if..let syntax to be confusing. The match statement is growing on me a bit, so I do find myself using that more recently.
@MattPlncht
@MattPlncht 10 ай бұрын
Amazing video, thanks a lot for explaining this topic!
@roopeshsaravanan8609
@roopeshsaravanan8609 Жыл бұрын
Could you provide the link to a github repo containing the code you wrote for the Rust playlist?
@GlobalYoung7
@GlobalYoung7 10 ай бұрын
thank you
@philipp332
@philipp332 Жыл бұрын
Your content is awesome
@davidlanday6102
@davidlanday6102 7 ай бұрын
does rust make any guaruntees about channel / thread allocation? For example, can I ensure that when I spawn two threads that they are on the same cpu core?
@TrevorSullivan
@TrevorSullivan 7 ай бұрын
That's a good question. Is there any reason that you wouldn't trust the OS thread scheduler to handle this appropriately? Why are you wanting to manually manage thread affinity from your Rust application? Are you building an OS in Rust?
@TrevorSullivan
@TrevorSullivan 7 ай бұрын
I do see there's a crate called "core_affinity" that would be worth exploring.
@davidlanday6102
@davidlanday6102 7 ай бұрын
@@TrevorSullivan not making an OS, but core affinity could be useful in a heavy compute (HPC) type of application. I might be wrong, but on hpc systems (while they have a control plane to manage resources over a network connection) you might want to ensure that you are not oversubscribing your resources or that a process utilizes only a certain number of cores and threads etc…?
@davidlanday6102
@davidlanday6102 7 ай бұрын
@@TrevorSullivan oh nice! I will look at this. Thanks!
@prashlovessamosa
@prashlovessamosa Жыл бұрын
Thanks for making this.
@PinganFeng
@PinganFeng 22 күн бұрын
Nice course ❤
@AhmedFalih-kj3tt
@AhmedFalih-kj3tt Жыл бұрын
I really enjoy your video… i have learnt how channels work and made me more confident to work with rust as js/ts programmer… my favourite thing is you provide simple explanations that i can understand and i love how you provide many situations that can help us… i really enjoy your videos.. thank you so much for that work… i hope you have discord so i can contact you ❤
@TrevorSullivan
@TrevorSullivan Жыл бұрын
Thanks for your kind feedback, Ahmed! I'm glad you are making progress! I'm on Discord @pcgeek86.
@AhmedFalih-kj3tt
@AhmedFalih-kj3tt Жыл бұрын
How about Arc with Mutex
Beginner's Guide to Rust Filesystem APIs 🦀 Rust Tutorial
41:02
Trevor Sullivan
Рет қаралды 15 М.
Learn TypeScript Generics In 13 Minutes
12:52
Web Dev Simplified
Рет қаралды 295 М.
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54
Rust Programming: TypeState Builder Pattern Explained
14:30
Jeremy Chone
Рет қаралды 35 М.
Rust Scoped Threads 🦀 Rust Tutorial
23:36
Trevor Sullivan
Рет қаралды 6 М.
Rust: Send Data between Threads
8:26
The Dev Method
Рет қаралды 11 М.
Implement the Simple Rust Default Trait 🦀 Rust Tutorial for Developers
19:19
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 332 М.
Compiler-Driven Development in Rust
13:11
No Boilerplate
Рет қаралды 57 М.
Creating a Chat Server with async Rust and Tokio
53:44
Manning Publications
Рет қаралды 14 М.