diff --git a/lib/elixir/lib/gen_server.ex b/lib/elixir/lib/gen_server.ex index d746557151e..2ed97ce7d9d 100644 --- a/lib/elixir/lib/gen_server.ex +++ b/lib/elixir/lib/gen_server.ex @@ -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]