Skip to content

Commit 28ffbcf

Browse files
authored
Add nil as documented valid option for GenServer :name (#15187)
1 parent f931052 commit 28ffbcf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/elixir/lib/gen_server.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ defmodule GenServer do
232232
a name on start via the `:name` option. Registered names are also
233233
automatically cleaned up on termination. The supported values are:
234234
235+
* `nil` (default) - the GenServer is not registered with a name.
236+
235237
* an atom - the GenServer is registered locally (to the current node)
236238
with the given name using `Process.register/2`.
237239
@@ -858,7 +860,7 @@ defmodule GenServer do
858860
@type on_start :: {:ok, pid} | :ignore | {:error, {:already_started, pid} | term}
859861

860862
@typedoc "The GenServer name"
861-
@type name :: atom | {:global, term} | {:via, module, term}
863+
@type name :: nil | atom | {:global, term} | {:via, module, term}
862864

863865
@typedoc "Options used by the `start*` functions"
864866
@type options :: [option]

0 commit comments

Comments
 (0)