diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-17 00:26:50 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-17 00:26:50 +0000 |
commit | e3068de72434d6152c40df691f26943c88327406 (patch) | |
tree | c7e1d433bb7b48b23973d33724c860a6e01696f7 /server | |
parent | 251c3259030b67d4821fec98d8c882cf7a7f0fd0 (diff) | |
download | thermoprint-e3068de72434d6152c40df691f26943c88327406.tar thermoprint-e3068de72434d6152c40df691f26943c88327406.tar.gz thermoprint-e3068de72434d6152c40df691f26943c88327406.tar.bz2 thermoprint-e3068de72434d6152c40df691f26943c88327406.tar.xz thermoprint-e3068de72434d6152c40df691f26943c88327406.zip |
Added TODO
Diffstat (limited to 'server')
-rw-r--r-- | server/src/Thermoprint/Server/Queue.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/src/Thermoprint/Server/Queue.hs b/server/src/Thermoprint/Server/Queue.hs index dcd4119..cebf759 100644 --- a/server/src/Thermoprint/Server/Queue.hs +++ b/server/src/Thermoprint/Server/Queue.hs | |||
@@ -135,6 +135,8 @@ runQM :: ( HasQueue q | |||
135 | , Monad (t STM) | 135 | , Monad (t STM) |
136 | ) => QueueManager t -> q -> t IO () | 136 | ) => QueueManager t -> q -> t IO () |
137 | -- ^ Periodically modify a 'Queue' | 137 | -- ^ Periodically modify a 'Queue' |
138 | -- | ||
139 | -- /TODO/: Garbage collect deleted jobs -- maybe switch to 'Set QueueItem' in 'QueueManager' | ||
138 | runQM qm (extractQueue -> q) = sleep =<< qm' | 140 | runQM qm (extractQueue -> q) = sleep =<< qm' |
139 | where | 141 | where |
140 | qm' = hoist atomically $ (\(a, s) -> lift (writeTVar q $!! s) >> return a) =<< runStateT (getComposeT qm) =<< lift (readTVar q) | 142 | qm' = hoist atomically $ (\(a, s) -> lift (writeTVar q $!! s) >> return a) =<< runStateT (getComposeT qm) =<< lift (readTVar q) |