7db37ddde0
orElse is great, but was not the right thing to use here because waitTakeLock could retry for other reasons than the lock being held, which made tryTakeLock fail when it shouldn't. Instead, move the code to tryTakeLock and implement waitTakeLock using tryTakeLock and retry. (Also, in runTransfer, when checkSaneLock fails, dropLock to avoid leaking a lock handle.) This commit was supported by the NSF-funded DataLad project. |
||
---|---|---|
.. | ||
LockHandle.hs | ||
PidLock.hs | ||
Posix.hs | ||
STM.hs | ||
Windows.hs |