capataz-0.1.0.1: OTP-like supervision trees in Haskell

Safe HaskellNone
LanguageHaskell2010

Control.Concurrent.Capataz.Internal.Worker

Description

This module contains all logic related to error handling when spawning threads to execute Worker sub-routines

Synopsis

Documentation

workerMain :: ParentSupervisorEnv -> WorkerOptions -> WorkerId -> RestartCount -> IO Worker Source #

Decorates the given IO () sub-routine with failure handling

forkWorker :: ParentSupervisorEnv -> WorkerOptions -> Maybe (WorkerId, RestartCount) -> IO Worker Source #

Internal function that forks a worker thread on the Capataz thread; note this is different from the public forkWorker function which sends a message to the capataz loop