This module can execute events at specified time. It uses a two thread system that allows the STM adding and deleting of new threads without requiring later IO actions. For a simpler system that uses relative times see Control.Event.Relative
- data EventId
- data EventSystem
- noEvent :: EventId
- initEventSystem :: IO EventSystem
- addEvent :: EventSystem -> UTCTime -> IO () -> IO EventId
- addEventSTM :: EventSystem -> UTCTime -> IO () -> STM EventId
- cancelEvent :: EventSystem -> EventId -> IO Bool
- cancelEventSTM :: EventSystem -> EventId -> STM Bool
- evtSystemSize :: EventSystem -> STM Int
IDs useful for canceling previously scheduled events.
The event system must be initilized using initEventSystem. More than one event system can be instantiated at once (eg. for non-interference).
A value indicating there is no such event. Canceling this event returns True and has no other effect.
Add an *action* to be performed at *time* by *system*. Returns a unique ID.
Cancel an event from the system, returning True on success.