use DList for the transfer queue
Some nice efficiency gains here for list appending, although mostly the small size of the transfer queue makes them irrelivant.
This commit is contained in:
parent
c6da464051
commit
362ed9f0e3
4 changed files with 21 additions and 16 deletions
|
@ -16,7 +16,7 @@ import Utility.TList
|
|||
|
||||
data TransferQueue = TransferQueue
|
||||
{ queuesize :: TVar Int
|
||||
, queuelist :: TVar [(Transfer, TransferInfo)]
|
||||
, queuelist :: TList (Transfer, TransferInfo)
|
||||
, deferreddownloads :: TList (Key, AssociatedFile)
|
||||
}
|
||||
|
||||
|
@ -26,5 +26,5 @@ data Schedule = Next | Later
|
|||
newTransferQueue :: IO TransferQueue
|
||||
newTransferQueue = atomically $ TransferQueue
|
||||
<$> newTVar 0
|
||||
<*> newTVar []
|
||||
<*> newTList
|
||||
<*> newTList
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue