News for hackers. Stuff that matters.
Re:Thread Safety Analysis in Clang by bla2 on Tuesday March 28, 2017 @10:22PM (#13982790)
In my experience dynamic checkers like https://clang.llvm.org/docs/ThreadSanitizer.html tend to work better that static checks.
Re:Thread Safety Analysis in Clang by jsolson on Tuesday March 28, 2017 @11:30PM (#13983142)
We (Google) do both.

Having recently done some coding in Swift to implement a little toy Hypervisor, I sorely missed these annotations. By and large the errors they catch are ones I'd be embarrassed to have pointed out in a code review; I don't mind nearly so much when the compiler catches me without my mutex locked.

Re:Thread Safety Analysis in Clang by duneroadrunner on Wednesday March 29, 2017 @12:03AM (#13983298)
When data races are the concern, SaferCPlusPlus provides nice data types for safely sharing objects asynchronously[1]. Basically, glorified shared_ptrs that automatically handle all the necessary locking (and blocking).

[1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus#asynchronou...