|Maintainer||David Sorokin <firstname.lastname@example.org>|
Tested with: GHC 7.0.3
A value in the
Process monad represents a discontinuous process that
can suspend in any simulation time point and then resume later in the same
or another time point.
The process of this type behaves like a dynamic process too. So, any value
Dynamics monad can be lifted to the Process monad. Moreover,
a value in the Process monad can be run in the Dynamics monad.
A value of the
ProcessID type is just an identifier of such a process.
- data ProcessID
- data Process a
- processQueue :: ProcessID -> EventQueue
- newProcessID :: EventQueue -> Simulation ProcessID
- newProcessIDWithCatch :: EventQueue -> Simulation ProcessID
- holdProcess :: Double -> Process ()
- interruptProcess :: ProcessID -> Dynamics ()
- processInterrupted :: ProcessID -> Dynamics Bool
- passivateProcess :: Process ()
- processPassive :: ProcessID -> Dynamics Bool
- reactivateProcess :: ProcessID -> Dynamics ()
- processID :: Process ProcessID
- cancelProcess :: ProcessID -> Dynamics ()
- processCanceled :: ProcessID -> Dynamics Bool
- runProcess :: Process () -> ProcessID -> Double -> Dynamics ()
- runProcessNow :: Process () -> ProcessID -> Dynamics ()
- catchProcess :: Process a -> (IOException -> Process a) -> Process a
- finallyProcess :: Process a -> Process b -> Process a
- throwProcess :: IOException -> Process a
Specifies a discontinuous process that can suspend at any time and then resume later.
Create a new process ID without exception handling.
Create a new process ID with capabilities of catching
the IOError exceptions and finalizing the computation.
The corresponded process will be slower than that one
which identifier is created with help of
Interrupt a process with the specified ID if the process
was held by computation
Test whether the process with the specified ID was interrupted.
Test whether the process with the specified ID is passivated.
Test whether the process with the specified ID is canceled.
Start the process with the specified ID at the desired time.
Start the process with the specified ID at the current simulation time.
Exception handling within
Throw the exception with the further exception handling.
By some reasons, the standard
throw function per se is not handled
Process computations, although it will be still
handled if it will be hidden under the
liftIO function. The problem
arises namely with the
throw function, not