Stability | experimental |
---|---|
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Safe Haskell | None |
Tested with: GHC 7.0.3
The module introduces the event queue. Any event is the Dynamics computation, or, saying differently, a dynamic process that has a single purpose to perform some side effect at the desired time. To pass the message, we actually use a closure.
- data EventQueue
- newQueue :: Simulation EventQueue
- enqueue :: EventQueue -> Double -> Dynamics () -> Dynamics ()
- runQueue :: EventQueue -> Dynamics ()
- runQueueSync :: EventQueue -> Dynamics ()
Documentation
data EventQueue Source
The EventQueue
type represents the event queue.
newQueue :: Simulation EventQueueSource
Create a new event queue.
enqueue :: EventQueue -> Double -> Dynamics () -> Dynamics ()Source
Enqueue the event which must be actuated at the specified time.
runQueue :: EventQueue -> Dynamics ()Source
Run the event queue processing its events.
runQueueSync :: EventQueue -> Dynamics ()Source
Run the event queue synchronously, i.e. without past.