seasonal v0.3.0 Seasonal.Pool

Provides a set of functions for using worker pools.

Unlike the main Seasonal module, this module allows for working directly with unnamed and unsupervised pools.

Summary

Functions

Wait until all jobs are finished

Start an unnamed, unsupervised pool with the given number of workers

Start a named unsupervised pool with the given number of workers

Stops the given pool

Gets the pid of the named pool

Get the number of workers for the given pool

Functions

join(name_or_pid, timeout \\ :infinity)

Wait until all jobs are finished.

queue(name_or_pid, func)

Queue a job.

start_link(workers)

Start an unnamed, unsupervised pool with the given number of workers.

start_link(name, workers)

Start a named unsupervised pool with the given number of workers.

stop(name_or_pid)

Stops the given pool.

whereis(name_or_pid)

Gets the pid of the named pool.

workers(name_or_pid)

Get the number of workers for the given pool.