ExPool v0.1.1 ExPool.State.Stash
A stash of workers.
This module defines a ExPool.State.Stash
struct and the main functions
to manage workers in a pool.
Fields
sup
- simple_one_for_one supervisor to start and supervise workersworkers
- list of available workers
Summary
Functions
Returns the number of available workers
Get a worker and remove it from the workers list
Builds a new Stash struct with the given configuration
Add a worker to the workers list
Types
Functions
Get a worker and remove it from the workers list.
Specs
new(opts :: [Keyword]) :: t
Builds a new Stash struct with the given configuration.
Configuration options
:worker_mod
- (Required) worker module that fits on a supervision tree