Daily iOS
Concurrency

Thread Sanitizer

How does Thread Sanitizer actually catch data races?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

TSan instruments every memory access and synchronization event at compile time and detects unsynchronized accesses at runtime through happens-before relationships. It's dynamic analysis that catches races while the code runs, so it complements Swift 6 static checking.

Share a question