summaryrefslogtreecommitdiff
path: root/Assistant/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-19 18:46:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-19 18:46:29 -0400
commit4887b1b3afd8acf58602d622499664ffb777a8b1 (patch)
tree16cd101c9a61320f5fbf1ca72f1a51f602f70824 /Assistant/Types
parent28336756f9e97173ce922d02c6eeed4e01d07e57 (diff)
maintain pools of running transferkeys processes (untested)
Diffstat (limited to 'Assistant/Types')
-rw-r--r--Assistant/Types/TransferrerPool.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Assistant/Types/TransferrerPool.hs b/Assistant/Types/TransferrerPool.hs
new file mode 100644
index 000000000..2727a6919
--- /dev/null
+++ b/Assistant/Types/TransferrerPool.hs
@@ -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