From ae5433c4caf0ee57e3338df6dcd625f20ece7101 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 18 May 2015 16:23:07 -0400 Subject: use lock pools throughout git-annex The one exception is in Utility.Daemon. As long as a process only daemonizes once, which seems reasonable, and as long as it avoids calling checkDaemon once it's already running as a daemon, the fcntl locking gotchas won't be a problem there. Annex.LockFile has it's own separate lock pool layer, which has been renamed to LockCache. This is a persistent cache of locks that persist until closed. This is not quite done; lockContent stil needs to be converted. --- Annex.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Annex.hs') diff --git a/Annex.hs b/Annex.hs index b0ebd81ae..2c0d65ee6 100644 --- a/Annex.hs +++ b/Annex.hs @@ -57,7 +57,7 @@ import Types.Messages import Types.UUID import Types.FileMatcher import Types.NumCopies -import Types.LockPool +import Types.LockCache import Types.MetaData import Types.DesktopNotify import Types.CleanupActions @@ -120,7 +120,7 @@ data AnnexState = AnnexState , trustmap :: Maybe TrustMap , groupmap :: Maybe GroupMap , ciphers :: M.Map StorableCipher Cipher - , lockpool :: LockPool + , lockcache :: LockCache , flags :: M.Map String Bool , fields :: M.Map String String , modmeta :: [ModMeta] @@ -166,7 +166,7 @@ newState c r = AnnexState , trustmap = Nothing , groupmap = Nothing , ciphers = M.empty - , lockpool = M.empty + , lockcache = M.empty , flags = M.empty , fields = M.empty , modmeta = [] -- cgit v1.2.3