Commit 46b079d
Lifeng Lu
Fix a race condition which leads product to hang
the order to read this.joinableTask is not ensured in the current lock-free part of the logic.
Under a race condition, this leads AsyncLazy to wait the inner task instead of the joinable task when two threads hitting this code about the same time.1 parent 56c02ec commit 46b079d
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
| |||
245 | 249 | | |
246 | 250 | | |
247 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
248 | 255 | | |
249 | 256 | | |
250 | 257 | | |
| |||
0 commit comments