3 ms·
RAII mutex locks are a pretty good tool. But like all "modern" c++ features still require programmer diligence to use correctly. Though there are likely other t
by kimixa 3y ago
RAII mutex locks are a pretty good tool. But like all "modern" c++ features still require programmer diligence to use correctly. Though there are likely other tools outside a compiler error to help enforce this, like static analyzers, or even thread sanitizer to help detect possible issues on a running system.
And just like rust do little to protect against general race conditions, deadlocks, or the many other logic issues you can pretty easily hit around threading. Looking back at my experience around issues that involve threads, I suspect the vast majority of issues I see aren't data races.
- frankjr 3y ago> And just like rust do little to protect against general race conditions IIRC those should be impossible if you avoid `unsafe`.