blob: ee9409a4b4164bd0382478d33658c1a5d6fc48d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
{- git-annex assistant pending transfer queue
-
- Copyright 2012 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.Types.TransferQueue where
import Annex.Common
import Logs.Transfer
import Control.Concurrent.STM
import Utility.TList
data TransferQueue = TransferQueue
{ queuesize :: TVar Int
, queuelist :: TList (Transfer, TransferInfo)
, deferreddownloads :: TList (Key, AssociatedFile)
}
data Schedule = Next | Later
deriving (Eq)
newTransferQueue :: IO TransferQueue
newTransferQueue = atomically $ TransferQueue
<$> newTVar 0
<*> newTList
<*> newTList
|