Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains all logic related to error handling when spawning threads to execute Worker sub-routines
- workerMain :: MonadUnliftIO m => ParentSupervisorEnv m -> WorkerOptions m -> WorkerId -> RestartCount -> m (Worker m)
- forkWorker :: MonadUnliftIO m => ParentSupervisorEnv m -> WorkerOptions m -> Maybe (WorkerId, RestartCount) -> m (Worker m)
Documentation
workerMain :: MonadUnliftIO m => ParentSupervisorEnv m -> WorkerOptions m -> WorkerId -> RestartCount -> m (Worker m) Source #
Decorates the given IO ()
sub-routine with failure handling
forkWorker :: MonadUnliftIO m => ParentSupervisorEnv m -> WorkerOptions m -> Maybe (WorkerId, RestartCount) -> m (Worker m) 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