improved WorkerPool abstraction

No behavior changes.
This commit is contained in:
Joey Hess 2019-06-05 13:03:05 -04:00
parent 30286bf067
commit c04b2af3e1
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 62 additions and 31 deletions

View file

@ -11,6 +11,7 @@ import Annex
import Annex.Common
import Annex.Action
import qualified Annex.Queue
import Types.WorkerPool
import qualified Data.Map as M
@ -42,7 +43,7 @@ dupState :: Annex AnnexState
dupState = do
st <- Annex.getState id
return $ st
{ Annex.workers = []
{ Annex.workers = UnallocatedWorkerPool
-- each thread has its own repoqueue
, Annex.repoqueue = Nothing
-- avoid sharing eg, open file handles