diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-25 01:33:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-25 01:33:44 -0400 |
commit | 6c8f6abbd5f1227fdbb7b8c93f257dca9b6a1372 (patch) | |
tree | 6ee22bd09c565135bbf5bde65efbaba640accae3 /Assistant/Types | |
parent | 2efb559c7cdce21fb441343c26af4855b6ac842f (diff) |
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.
Diffstat (limited to 'Assistant/Types')
-rw-r--r-- | Assistant/Types/TransferQueue.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Assistant/Types/TransferQueue.hs b/Assistant/Types/TransferQueue.hs index 706c64bbb..e4e305d5a 100644 --- a/Assistant/Types/TransferQueue.hs +++ b/Assistant/Types/TransferQueue.hs @@ -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 |