4 ms·
I don't see any C++ compilers raising warnings because you use shared mutable objects without grabbing the right lock first.
by catnaroek 10y ago
I don't see any C++ compilers raising warnings because you use shared mutable objects without grabbing the right lock first.
- MaulingMonkey 10y agoCheck out https://clang.llvm.org/docs/ThreadSafetyAnalysis.html https://clang.llvm.org/docs/ThreadSafetyAnalysis.html Requires manual annotation and isn't nearly as systematic and comprehensive as the Rust compiler, but I've found threading bugs with this in existing code that I was about to modify.
- catnaroek 10y agoAh, this is very nice.