Arc and Mutex in Rust
When writing concurrent Rust you will encounter
Arc
andMutex
types sooner or later. And althoughMutex
might already sound familiar as it's a concept known in many languages, chances are you haven't heard aboutArc
before Rust. What's more, you can't fully understand these concepts without tying them to the ownership model in Rust. This post is my take on understandingArc
andMutex
in Rust.
Source: Arc and Mutex in Rust, an article by Piotr Sarnacki.