4 ms·
> With async you can basically ignore sharing and write stuff that works against the same data structures because you know they’re mutually exclusive. How does
by CodesInChaos 4y ago
> With async you can basically ignore sharing and write stuff that works against the same data structures because you know they’re mutually exclusive.
How does that simplify things in rust? You don't get shared mutability either way, and RefCell is barely simpler than Mutex.
- pkolaczk 4y agoYou don't need RefCell. You can just use mut variables as long as you keep everything local inside one task. But one task can actually run many things concurrently, unlike a thread, so this is very powerful.