Commit 13bb792
committed
[bugfix] Fix a livelock issue in MultiLock.Sync.tryAcquireShared(long).
The try method could previously block indefinetly when a thread tried to acquire a mode.
Such an example is t1 acquires IX, and then t2 acquires S; causing t2 to spin indefinetly.
CompatibilityTest surfaced the issue.1 parent 2460fb3 commit 13bb792
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
| |||
332 | 334 | | |
333 | 335 | | |
334 | 336 | | |
| 337 | + | |
| 338 | + | |
335 | 339 | | |
336 | 340 | | |
337 | 341 | | |
| |||
0 commit comments