by pjmlp · 3w ago · 0 comments
Threads and concurrency is not the same by the way, as Rob Pike puts it, "concurrency is not parallelism".
Why did you start talking about multiple processes? That's a much less common way to do concurrency these days.
Process-shared memory is an OS-specific feature with wildly diverging semantics, and it's not possible to write a memory-safe portable abstraction over that in any language. Windows comes the closest with mandatory file locking. On Linux there's nothing you can do but pray. Hence, `mmap()` is fundamentally unsafe in Rust, and that's perfectly fine.