threads-supervisor-1.0.0.0: Simple, IO-based library for Erlang-style thread supervision

Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Concurrent.Supervisor

Synopsis

Documentation

type Supervisor = Supervisor_ Initialised Source

data RestartStrategy Source

Erlang inspired strategies.

Constructors

OneForOne 

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.

supervise :: SupervisorSpec -> IO Supervisor Source

forkSupervised Source

Arguments

:: Supervisor

The Supervisor

-> RestartStrategy

The RestartStrategy to use

-> IO ()

The computation to run

-> IO ThreadId 

Fork a thread in a supervised mode.