| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Worker.WorkerState
Description
The worker pool's run state and its shutdown signal.
Synopsis
- data WorkerState
- newWorkerState :: IO (TVar WorkerState)
- signalShutdown :: TVar WorkerState -> IO ()
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
| Eq WorkerState Source # | |
Defined in Arbiter.Worker.WorkerState | |
| Show WorkerState Source # | |
Defined in Arbiter.Worker.WorkerState Methods #showsPrec :: Int -> WorkerState -> ShowS #show :: WorkerState -> String #showList :: [WorkerState] -> ShowS | |
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.