Snakepit.Pool (snakepit v0.1.2)

Pool manager for external workers with concurrent initialization.

Features:

  • Concurrent worker startup (all workers start in parallel)
  • Simple queue-based request distribution
  • Non-blocking async execution
  • Automatic request queueing when workers are busy
  • Adapter-based support for any external process

Summary

Functions

Returns a specification to start this module under a supervisor.

Executes a command on any available worker.

Gets pool statistics.

Lists all worker IDs in the pool.

Starts the pool manager.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

execute(command, args, opts \\ [])

Executes a command on any available worker.

get_stats(pool \\ __MODULE__)

Gets pool statistics.

list_workers(pool \\ __MODULE__)

Lists all worker IDs in the pool.

start_link(opts \\ [])

Starts the pool manager.