3 ms·
One clarification: Rust's concurrency primitives aren't based on shared-memory data structures, because that leaves you vulnerable to data races and can require
by kibwen 13y ago
One clarification: Rust's concurrency primitives aren't based on shared-memory data structures, because that leaves you vulnerable to data races and can require either a stop-the-world or concurrent GC. Instead it makes use of linear types to keep track of ownership between tasks, which is more restrictive but also means that sending data between any two tasks is memory-safe and never more expensive than the cost of copying a pointer.