summaryrefslogtreecommitdiff
path: root/Utility/LockPool
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-03-01 13:47:49 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-03-01 13:47:49 -0400
commit784c3fa0139a5fc0ce459501d713cfe5c39d5a23 (patch)
treed13a57ad1f523eef5d3024fd1012df9aaf691dd6 /Utility/LockPool
parent25b996305ed9dd5460cf09bcc6d62fb076ab7d22 (diff)
comment
Diffstat (limited to 'Utility/LockPool')
-rw-r--r--Utility/LockPool/PidLock.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Utility/LockPool/PidLock.hs b/Utility/LockPool/PidLock.hs
index 8cacd4bf6..2b3ee67f9 100644
--- a/Utility/LockPool/PidLock.hs
+++ b/Utility/LockPool/PidLock.hs
@@ -33,6 +33,8 @@ import Prelude
-- Takes a pid lock, blocking until the lock is available or the timeout.
waitLock :: Seconds -> LockFile -> IO LockHandle
waitLock timeout file = makeLockHandle
+ -- LockShared for STM lock, because a pid lock can be the top-level
+ -- lock with various other STM level locks gated behind it.
(P.waitTakeLock P.lockPool file LockShared)
(mk <$> F.waitLock timeout file)