Pool

Source

Summary

child_spec(ref, opts)

Creates a proper child worker spec to be inserted into the supervision tree

start(type, args)

Application callback for start/2

start_listener(ref, num_acceptors, transport, t_opts, protocol, p_opts, l_opts)

Starts a new listener as a child in the application’s supervision tree

stop_listener(ref)

Stops a listener, and removes it from the supervision tree

Functions

child_spec(ref, opts)

Specs:

  • child_spec(atom, any) :: any

Creates a proper child worker spec to be inserted into the supervision tree.

Source
start(type, args)

Application callback for start/2.

Creates a new ets table for storing atom-based references and matching listener PIDs for Pool.Server, and adds Pool.Server as a child to the application’s supervision tree.

Source
start_listener(ref, num_acceptors, transport, t_opts, protocol, p_opts, l_opts)

Specs:

  • start_listener(atom, integer, any, any, any, any, any) :: {:ok, pid} | {:error, term}

Starts a new listener as a child in the application’s supervision tree.

Source
stop_listener(ref)

Specs:

  • stop_listener(atom) :: :ok | {:error, term}

Stops a listener, and removes it from the supervision tree.

Source