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.
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine