How do you handle the reference counting pauses in Rust then; rely on them being deterministic? Or do you completely avoid the reference counting boxes?
How does reference counting pause? There's no stop-the-world GC action, as the garbage collection is amortized over every object deallocating itself.
That's not entirely true, if your decrement results in a cascading free of an entire tree of objects you will pay for the deallocation time for that entire tree -- decrement, free, decrement children, free, etc..
And unless your RC algorithm is more clever than most that's going to be stop-the-world.
Rc is scoped to a single thread, so it'll be, at worst, stop-the-thread.
Not the OP, but in my experience it's fairly rare to encounter someone using the `Rc` type in Rust. It's nowhere near as prevalent as `shared_ptr` seems to be in C++, for example.
There is also the `Arc` type, which is an atomic reference counter. You still need those, especially if you need to share stuff between multiple threads.
You can often get away with using scoped threads.
Yeah, a lot of that has to do with the borrow checker guiding you towards single-ownership designs with is a good thing(tm).