Re:How to think about `async`/`await` in Rust
by cmrdporcupine on Wednesday July 05, 2023 @12:30PM
(#36602793)
+1. This approach of having guardian threads/actors etc communicating by messages is just a natural for Rust, too, because it nicely deals with a whole pile of borrow checker & lifecycle issues, too.
crossbeam_channel FTW
Not obvious to me I'm afraid. Using CSP, this is almost trivially easy. All access to the data goes through a guardian thread. Accessing the resource is just sending a message.
And mutexes are not hard either.