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. --- Types/LockCache.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Types/LockCache.hs (limited to 'Types/LockCache.hs') diff --git a/Types/LockCache.hs b/Types/LockCache.hs new file mode 100644 index 000000000..c1f394cf0 --- /dev/null +++ b/Types/LockCache.hs @@ -0,0 +1,16 @@ +{- git-annex lock cache data types + - + - Copyright 2014 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module Types.LockCache ( + LockCache, + LockHandle +) where + +import qualified Data.Map as M +import Utility.LockPool + +type LockCache = M.Map FilePath LockHandle -- cgit v1.2.3