summaryrefslogtreecommitdiff
path: root/Announcer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Announcer.hs')
-rw-r--r--Announcer.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Announcer.hs b/Announcer.hs
index 370ef13a..41c1c2a6 100644
--- a/Announcer.hs
+++ b/Announcer.hs
@@ -177,10 +177,10 @@ listener announcer = relisten
177 case cmd of 177 case cmd of
178 ScheduleAction (k, p, s) -> atomically $ modifyScheduled $ PSQ.insert' k s p 178 ScheduleAction (k, p, s) -> atomically $ modifyScheduled $ PSQ.insert' k s p
179 UnscheduleAction k -> atomically $ modifyScheduled $ PSQ.delete k 179 UnscheduleAction k -> atomically $ modifyScheduled $ PSQ.delete k
180 RunAction io -> io 180 RunAction io -> void $ fork io
181 RunActionSTM k (ScheduledItem f) -> do 181 RunActionSTM k (ScheduledItem f) -> do
182 now <- getPOSIXTime 182 now <- getPOSIXTime
183 join . atomically $ modifyScheduled (PSQ.delete k) >> f announcer k now 183 void . fork . join . atomically $ modifyScheduled (PSQ.delete k) >> f announcer k now
184 DelayAction (k, p, s) -> do 184 DelayAction (k, p, s) -> do
185 now <- getPOSIXTime 185 now <- getPOSIXTime
186 atomically $ modifyScheduled $ PSQ.insert' k s (now + p) 186 atomically $ modifyScheduled $ PSQ.insert' k s (now + p)