()
| 367 | }) |
| 368 | // Called from the acquisition loop only, so no acquire is in flight |
| 369 | const checkHandedOff = () => { |
| 370 | if ( |
| 371 | handingOff && |
| 372 | MutableHashSet.size(acquiredShards) === 0 && |
| 373 | MutableHashSet.size(releasingShards) === 0 && |
| 374 | !forcedShardReleasePending() |
| 375 | ) { |
| 376 | handedOff.unsafeOpen() |
| 377 | } |
| 378 | } |
| 379 | // While handing off, the pending shards are released together: one |
| 380 | // teardown pass for all of them, then each lock is released. |
| 381 | let handoffReleaseRunning = false |
no test coverage detected