speed up enteringStage in non-concurrent mode
Avoid a STM transaction. Also got rid of UnallocatedWorkerPool.
This commit is contained in:
parent
05a908c3c9
commit
9671248fff
4 changed files with 29 additions and 39 deletions
5
Annex.hs
5
Annex.hs
|
@ -142,7 +142,7 @@ data AnnexState = AnnexState
|
|||
, tempurls :: M.Map Key URLString
|
||||
, existinghooks :: M.Map Git.Hook.Hook Bool
|
||||
, desktopnotify :: DesktopNotify
|
||||
, workers :: TMVar (WorkerPool AnnexState)
|
||||
, workers :: Maybe (TMVar (WorkerPool AnnexState))
|
||||
, activekeys :: TVar (M.Map Key ThreadId)
|
||||
, activeremotes :: MVar (M.Map (Types.Remote.RemoteA Annex) Integer)
|
||||
, keysdbhandle :: Maybe Keys.DbHandle
|
||||
|
@ -155,7 +155,6 @@ newState :: GitConfig -> Git.Repo -> IO AnnexState
|
|||
newState c r = do
|
||||
emptyactiveremotes <- newMVar M.empty
|
||||
emptyactivekeys <- newTVarIO M.empty
|
||||
emptyworkerpool <- newTMVarIO UnallocatedWorkerPool
|
||||
o <- newMessageState
|
||||
sc <- newTMVarIO False
|
||||
return $ AnnexState
|
||||
|
@ -200,7 +199,7 @@ newState c r = do
|
|||
, tempurls = M.empty
|
||||
, existinghooks = M.empty
|
||||
, desktopnotify = mempty
|
||||
, workers = emptyworkerpool
|
||||
, workers = Nothing
|
||||
, activekeys = emptyactivekeys
|
||||
, activeremotes = emptyactiveremotes
|
||||
, keysdbhandle = Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue