|
|
|
|
|
by MuffinFlavored
836 days ago
|
|
Can you help me understand when to use Rc<T> instead of Arc<T> (atomic reference counter)? Edit: Googled it. Found an answer: > The only distinction between Arc and Rc is that the former is very slightly more expensive, but the latter is not thread-safe. |
|
[1] https://doc.rust-lang.org/rust-by-example/std/rc.html
[2] https://doc.rust-lang.org/rust-by-example/std/arc.html
[3] https://doc.rust-lang.org/std/sync/struct.Mutex.html