Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

tsan will catch a bunch of potential race conditions for you, under the condition that you run it somehow. How to make sure it's run? Well, add a test for the relevant code and add it to your tsan run in your CI and you'll certainly catch a bunch of race conditions over time.

This has saved me a bunch of times when I've be doing work in code with proneness to those kind of issues. Sometimes it will just lead to a flaky test, but the investigation of the flake will usually find the root cause in the end.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: