diff options
author | Joey Hess <joey@kitenet.net> | 2014-08-20 16:45:58 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-08-20 16:45:58 -0400 |
commit | 679d9c0027ac996eea9f41a6f0f39af436801e89 (patch) | |
tree | d98ae7ba049e2daa4a99e6bcf55054bde5e5ab4d /Types/LockPool.hs | |
parent | 86f9d7734d0c638d4c966fd87a5d7e97759e125b (diff) |
reorganize and refactor lock code
Added a convenience Utility.LockFile that is not a windows/posix
portability shim, but still manages to cut down on the boilerplate around
locking.
This commit was sponsored by Johan Herland.
Diffstat (limited to 'Types/LockPool.hs')
-rw-r--r-- | Types/LockPool.hs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Types/LockPool.hs b/Types/LockPool.hs index dd392f28b..c7d411cdc 100644 --- a/Types/LockPool.hs +++ b/Types/LockPool.hs @@ -5,20 +5,12 @@ - Licensed under the GNU GPL version 3 or higher. -} -{-# LANGUAGE CPP #-} - module Types.LockPool ( LockPool, LockHandle ) where import qualified Data.Map as M - -#ifndef mingw32_HOST_OS -import System.Posix.Types (Fd) -type LockHandle = Fd -#else -import Utility.WinLock -- defines LockHandle -#endif +import Utility.LockFile type LockPool = M.Map FilePath LockHandle |