Elixir Function of the Day

A start page for alchemists! Roll the dice.



Function signature:

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


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.