diff options
-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) |