Add nil as documented valid option for GenServer :name (#15187)

This commit is contained in:
Philipp
2026-03-12 20:37:58 +01:00
committed by GitHub
parent f9310524b1
commit 28ffbcfe84
+3 -1
View File
@@ -232,6 +232,8 @@ defmodule GenServer do
a name on start via the `:name` option. Registered names are also
automatically cleaned up on termination. The supported values are:
* `nil` (default) - the GenServer is not registered with a name.
* an atom - the GenServer is registered locally (to the current node)
with the given name using `Process.register/2`.
@@ -858,7 +860,7 @@ defmodule GenServer do
@type on_start :: {:ok, pid} | :ignore | {:error, {:already_started, pid} | term}
@typedoc "The GenServer name"
@type name :: atom | {:global, term} | {:via, module, term}
@type name :: nil | atom | {:global, term} | {:via, module, term}
@typedoc "Options used by the `start*` functions"
@type options :: [option]