News for hackers. Stuff that matters.
Re:A Guide to Porting C/C++ to Rust by the8472 on Sunday January 29, 2017 @10:06AM (#13514399)
That is a runtime check similar to RefCell::borrow() panic if you try to read from it while something else is mutating it.
Re:A Guide to Porting C/C++ to Rust by catnaroek on Sunday January 29, 2017 @10:11AM (#13514413)
With two important differences:

(0) RefCell can't be used in a multithreaded context. You have to use an actual Mutex.

(1) ConcurrentModificationException isn't reliable. It's thrown on a best-effort basis.

In any case, in a high-level language, just memory-safety is a very cheap guarantee. You also want to protect the internal invariants of your data structures - especially the concurrent ones!