Commit 3a4a989
fix: Use atomic for cross-thread access in thread_pool and test
TSan detected data races:
- thread_pool::m_IsShuttingDown was accessed without synchronization
- coroutine_task_test value variable was modified on thread pool and
read on main thread without synchronization
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 88368c8 commit 3a4a989
File tree
2 files changed
+5
-3
lines changed- cpp/include/mh/concurrency
- test
2 files changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
0 commit comments