Repository navigation
Commit 8c607f9
Fix TSAN: move mutex init to base class constructor
The mutex initialization must happen in FileLogger2PImplBase constructor,
BEFORE StatusChangeLogger's constructor runs. StatusChangeLogger subscribes
to callbacks during construction, which may fire and access the mutex.
Having the mutex "used" by the main thread before any other thread accesses
it establishes the happens-before relationship that TSAN requires.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 3799607 commit 8c607f9
1 file changed
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
| |||
0 commit comments