3 ms·
Interestingly, for rust-gc, the initial safe GC design was the hard part. Concurrency is easy to bolt on to it[1]. Basically, once we had a GC design that was
by Manishearth 11y ago
Interestingly, for rust-gc, the initial safe GC design was the hard part. Concurrency is easy to bolt on to it[1].
Basically, once we had a GC design that was "safe" (In Rust terms; i.e. can't be used in safe Rust to trigger memory or thread unsafety), making GCd objects passable between threads was a clean, logical extension of the existing model.
This is probably because Rust's safety model in a single threaded situation is very close to what you need for multithreaded safety too.
[1]: however it gets tricky again if you want to avoid pausing threads as much as possible (i.e. only pause on a GC mutation).