# `Mead.Session.Pool`
[🔗](https://github.com/albertosca/mead/blob/main/lib/mead/session/pool.ex#L1)

Dynamically starts and stops the per-conversation supervisors.

The number of live sessions is bounded by `:maximum_sessions` (the option of `start_link/1`,
then `config :mead, :maximum_sessions`, then 1000); a session beyond it is refused with
`{:error, :max_children}` instead of growing the node without limit.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(keyword()) :: Supervisor.on_start()
```

# `start_session`

```elixir
@spec start_session(keyword(), Supervisor.supervisor()) ::
  DynamicSupervisor.on_start_child()
```

Starts the supervisor pair for the conversation described by `options`.

# `stop_session`

```elixir
@spec stop_session(String.t()) :: :ok | {:error, :not_found}
```

Stops a conversation's supervisor pair; a stored conversation stays on disk.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
