Commit 3799607
Fix TSAN: acquire mutex before spawning writer thread
Establish a happens-before relationship by acquiring the mutex in the
main thread before starting the writer thread. This satisfies TSAN's
requirement that mutex creation and first cross-thread access are
properly synchronized.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent a3f853a commit 3799607
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
| |||
0 commit comments