Improved locking when multiple git-annex processes are writing to the .git/index file

This commit is contained in:
Joey Hess 2019-05-06 15:15:12 -04:00
parent 4bc99e4c21
commit b03e65d260
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 18 additions and 21 deletions

View file

@ -75,7 +75,6 @@ import Control.Concurrent
import Control.Concurrent.Async
import Control.Concurrent.STM
import qualified Control.Monad.Fail as Fail
import qualified Control.Concurrent.SSem as SSem
import qualified Data.Map.Strict as M
import qualified Data.Set as S
@ -116,7 +115,6 @@ data AnnexState = AnnexState
, daemon :: Bool
, branchstate :: BranchState
, repoqueue :: Maybe Git.Queue.Queue
, repoqueuesem :: SSem.SSem
, catfilehandles :: M.Map FilePath CatFileHandle
, hashobjecthandle :: Maybe HashObjectHandle
, checkattrhandle :: Maybe CheckAttrHandle
@ -159,7 +157,6 @@ newState c r = do
emptyactivekeys <- newTVarIO M.empty
o <- newMessageState
sc <- newTMVarIO False
qsem <- SSem.new 1
return $ AnnexState
{ repo = r
, repoadjustment = return
@ -175,7 +172,6 @@ newState c r = do
, daemon = False
, branchstate = startBranchState
, repoqueue = Nothing
, repoqueuesem = qsem
, catfilehandles = M.empty
, hashobjecthandle = Nothing
, checkattrhandle = Nothing