arbiter-worker-0.1.0.0
arbiter-worker
Safe HaskellNone
LanguageGHC2024

Arbiter.Worker.WorkerState

Description

The worker pool's run state and its shutdown signal.

Synopsis

Documentation

Source #data WorkerState

A worker pool's effective state, read off the shutdown and pause flags on its WorkerConfig: shutdown wins, then pause, else running.

Constructors

Running 
Paused 
ShuttingDown 

Instances

Instances details
Eq WorkerState Source # 
Instance details

Defined in Arbiter.Worker.WorkerState

Show WorkerState Source # 
Instance details

Defined in Arbiter.Worker.WorkerState

Source #newWorkerState :: IO (TVar WorkerState)

Create a new worker state initialized to Running.

Source #signalShutdown :: TVar WorkerState -> IO ()

Signal graceful shutdown: the pool stops claiming, finishes what it holds, exits.