3 ms·
This is entirely wrong. You can easily pass a raw pointer (I.e. same semantics as a C pointer) between tasks and use this to unsafely share memory (I.e. risk of
by dbaupp 13y ago
This is entirely wrong. You can easily pass a raw pointer (I.e. same semantics as a C pointer) between tasks and use this to unsafely share memory (I.e. risk of data races), or you can use one of the safe higher level wrappers in extra::arc, that is, Arc for immutable shared memory, or RWArc or MutexArc for lock-protected mutable shared memory.
- chrismorgan 13y agoIt's still worth while noting that Rust’s modus operandi eschews shared memory; to get shared memory between tasks, you've got to be fairly explicit about it.