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:
Joey Hess 2020-04-17 14:36:45 -04:00
parent 988317634b
commit fe9cf1256e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 148 additions and 20 deletions

View file

@ -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