Core.Workers.WorkerPool (ServCore v0.3.0)

Copy Markdown View Source

Supervisor that manages a pool of concurrent workers.

Pool size defaults to the number of online schedulers (CPU cores). Configure via the :worker_pool_size application env:

config :servcore, worker_pool_size: 4

Or pass at startup:

{Core.Workers.WorkerPool, name: MyApp.Pool, worker: MyApp.Worker, size: 4, queue: MyApp.Queue}

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])