Elixir Function of the Day

A start page for alchemists! Roll the dice.

DynamicSupervisor.stop/3

 Share!

Function signature:

stop(supervisor, reason \\ :normal, timeout \\ :infinity)

Documentation:

Synchronously stops the given supervisor with the given reason.

It returns :ok if the supervisor terminates with the given reason. If it terminates with another reason, the call exits.

This function keeps OTP semantics regarding error reporting. If the reason is any other than :normal, :shutdown or {:shutdown, _}, an error report is logged.