fine-grained locking when annex.pidlock is enabled
This locking has been missing from the beginning of annex.pidlock. It used to be possble, when two threads are doing conflicting things, for both to run at the same time despite using locking. Seems likely that nothing actually had a problem, but it was possible, and this eliminates that possible source of failure. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
a5fcc03595
commit
e5ca67ea1c
6 changed files with 121 additions and 61 deletions
|
@ -8,7 +8,7 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Utility.LockPool.LockHandle (
|
||||
LockHandle,
|
||||
LockHandle(..),
|
||||
FileLockOps(..),
|
||||
dropLock,
|
||||
#ifndef mingw32_HOST_OS
|
||||
|
@ -86,4 +86,3 @@ mkLockHandle :: P.LockHandle -> FileLockOps -> IO LockHandle
|
|||
mkLockHandle ph fo = do
|
||||
atomically $ P.registerCloseLockFile ph (fDropLock fo)
|
||||
return $ LockHandle ph fo
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue