This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit f0f48ee
Rollup merge of rust-lang#98503 - RalfJung:scope-race, r=m-ou-se
fix data race in thread::scope
Puts the `ScopeData` into an `Arc` so it sticks around as long as we need it.
This means one extra `Arc::clone` per spawned scoped thread, which I hope is fine.
Fixes rust-lang#98498
r? `````@m-ou-se`````1 parent 645c322 commit f0f48ee
2 files changed
+17
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
462 | 463 | | |
463 | 464 | | |
464 | 465 | | |
465 | | - | |
| 466 | + | |
466 | 467 | | |
467 | 468 | | |
468 | 469 | | |
| |||
479 | 480 | | |
480 | 481 | | |
481 | 482 | | |
482 | | - | |
483 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
484 | 488 | | |
485 | 489 | | |
486 | 490 | | |
| |||
507 | 511 | | |
508 | 512 | | |
509 | 513 | | |
510 | | - | |
| 514 | + | |
511 | 515 | | |
512 | 516 | | |
513 | 517 | | |
| |||
1298 | 1302 | | |
1299 | 1303 | | |
1300 | 1304 | | |
1301 | | - | |
| 1305 | + | |
1302 | 1306 | | |
| 1307 | + | |
1303 | 1308 | | |
1304 | 1309 | | |
1305 | 1310 | | |
| |||
1330 | 1335 | | |
1331 | 1336 | | |
1332 | 1337 | | |
1333 | | - | |
| 1338 | + | |
1334 | 1339 | | |
1335 | 1340 | | |
1336 | 1341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | | - | |
| 136 | + | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
253 | | - | |
| 255 | + | |
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
| |||
0 commit comments