maintain pools of running transferkeys processes (untested)

This commit is contained in:
Joey Hess 2013-03-19 18:46:29 -04:00
parent ef3221181d
commit b6d691aff7
7 changed files with 178 additions and 86 deletions

View file

@ -0,0 +1,23 @@
{- A pool of "git-annex transferkeys" processes
-
- Copyright 2013 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.Types.TransferrerPool where
import Common.Annex
import Control.Concurrent.STM
type TransferrerPool = TChan Transferrer
data Transferrer = Transferrer
{ transferrerRead :: Handle
, transferrerWrite :: Handle
, transferrerHandle :: ProcessHandle
}
newTransferrerPool :: IO TransferrerPool
newTransferrerPool = newTChanIO