3 ms·
Worth noting that Rust also supports "Shared Ownership, Immutable" data - that's what Arc<T> gives you when T has no interior mutability, and thus implements Sy
by zozbot234 4y ago
Worth noting that Rust also supports "Shared Ownership, Immutable" data - that's what Arc<T> gives you when T has no interior mutability, and thus implements Sync by default. (By contrast, a T with interior mutability needs explicit atomicity or synchronization, or else cannot have its access shared by multiple threads.)
- samsquire 4y agoThis is powerful. I'm not sure how to implement shared memory semantics in an interpreter since each interpreter has its own state.