Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- 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
type RestartAction = ThreadId -> IO ThreadId Source
data SupervisionEvent Source
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
:: Supervisor | The |
-> RestartStrategy | The |
-> IO () | The computation to run |
-> IO ThreadId |
Fork a thread in a supervised mode.