Rust: Send Data between Threads

preview_player
Показать описание
#rust #thread #data
Threads or actors communicate with one another by sending messages containing data

The Rust Standard Library provides an implentation of Channels.

A Channel is concept where one thread sends data to another thread.

Links

The Rust Programming Book
Chapter 16 Section 2
Рекомендации по теме
Комментарии
Автор

This channel deserves a tone of subscribers. Great job!

LucidGR
Автор

Love your teaching style and your channel, please keep up the good work. I hope your popularity will grow with Rust's 🦀!

bissbort
Автор

The next topic will be great, I'm coding an app which uses shared state and it's hard to work with library structs that aren't Send+Sync. Nice video as always

Gabriel
Автор

OK, but where to use it? Is there some design patterns in message passing?

Автор

Awesome video, if you were trying to utilise threads to the maximum level would you need to do some sort of logic to get the users specs of machine and how many threads their system is capable of etc? I honestly don't have any experience with threads or really much knowledge of the underlying processes of a CPU etc and if it does differentiate between machines etc... Is this knowledge needed? and if so do you have any places to look to learn more about these ideas?

Thanks for the videos I've only recently found your channel but everything I have watched so far has been really valuable.

danraine
Автор

What happens if that thread you are sending messages to, is really busy. Will messages be dropped or will the sending wait. Is there some sort of acknowledge?

marcel