add Annex worker pool to P2PHttp
This will be needed for get and store, since those need to run Annex actions. withLocalP2PConnections will also probably use it.
This commit is contained in:
parent
d4b9aea87b
commit
f9b7ce7224
7 changed files with 97 additions and 23 deletions
|
@ -87,9 +87,8 @@ commandAction start = do
|
|||
|
||||
runconcurrent sizelimit Nothing = runnonconcurrent sizelimit
|
||||
runconcurrent sizelimit (Just tv) =
|
||||
liftIO (atomically (waitStartWorkerSlot tv)) >>= maybe
|
||||
(runnonconcurrent sizelimit)
|
||||
(runconcurrent' sizelimit tv)
|
||||
liftIO (atomically (waitStartWorkerSlot tv))
|
||||
>>= runconcurrent' sizelimit tv
|
||||
runconcurrent' sizelimit tv (workerstrd, workerstage) = do
|
||||
aid <- liftIO $ async $ snd
|
||||
<$> Annex.run workerstrd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue