Sending data across threads

So far, we've looked at threads that work independently. Now, let's take a look at intertwined threads that need to share data. This situation is common when setting up servers, as the thread receiving client messages is usually not the same as the one that actually handles and responds to the client input. Rust gives us the concept of channels as a solution. A channel is split into a sender and a receiver which can share data across threads.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.106.135