| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Control.Concurrent.Supervisor
- type Supervisor = Supervisor_ Initialised
- data DeadLetter
- data Child = Child !RestartStrategy RestartAction
- type RestartAction = ThreadId -> IO ThreadId
- data SupervisionEvent
- data RestartStrategy = OneForOne
- newSupervisor :: IO SupervisorSpec
- shutdownSupervisor :: Supervisor -> IO ()
- eventStream :: Supervisor -> TBQueue SupervisionEvent
- activeChildren :: Supervisor -> IO Int
- supervise :: SupervisorSpec -> IO Supervisor
- forkSupervised :: Supervisor -> RestartStrategy -> IO () -> IO ThreadId
Documentation
type Supervisor = Supervisor_ Initialised Source
data DeadLetter Source
Constructors
| Child !RestartStrategy RestartAction |
type RestartAction = ThreadId -> IO ThreadId Source
data SupervisionEvent Source
Constructors
| ChildBorn !ThreadId !UTCTime | |
| ChildDied !ThreadId !SomeException !UTCTime | |
| ChildRestarted !ThreadId !ThreadId !RestartStrategy !UTCTime | |
| ChildFinished !ThreadId !UTCTime |
Instances
newSupervisor :: IO SupervisorSpec Source
Creates a new supervisor
shutdownSupervisor :: Supervisor -> IO () Source
Shutdown the given supervisor. This will cause the supervised children to be killed as well.
activeChildren :: Supervisor -> IO Int Source
supervise :: SupervisorSpec -> IO Supervisor Source
Arguments
| :: Supervisor | The |
| -> RestartStrategy | The |
| -> IO () | The computation to run |
| -> IO ThreadId |
Fork a thread in a supervised mode.