move remoteList into dupState
This does mean that RemoteDaemon.Transport.Tor's call runs it, otherwise no change, but this is groundwork for doing more such expensive actions in dupState.
This commit is contained in:
parent
988317634b
commit
fe9cf1256e
7 changed files with 148 additions and 20 deletions
|
@ -245,11 +245,6 @@ startConcurrency usedstages a = do
|
|||
liftIO $ setNumCapabilities n
|
||||
|
||||
initworkerpool n = do
|
||||
-- Generate the remote list now, to avoid each thread
|
||||
-- generating it, which would be more expensive and
|
||||
-- could cause threads to contend over eg, calls to
|
||||
-- setConfig.
|
||||
_ <- remoteList
|
||||
tv <- liftIO newEmptyTMVarIO
|
||||
Annex.changeState $ \s -> s { Annex.workers = Just tv }
|
||||
st <- dupState
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue