Skip to content

Commit 1b1e5c9

Browse files
authored
Improve doc navigability for child spec options (#14097)
1 parent 853e9ca commit 1b1e5c9

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/elixir/lib/gen_server.ex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,16 @@ defmodule GenServer do
203203
The generated `child_spec/1` can be customized with the following options:
204204
205205
* `:id` - the child specification identifier, defaults to the current module
206-
* `:restart` - when the child should be restarted, defaults to `:permanent`
207-
* `:shutdown` - how to shut down the child, either immediately or by giving it time to shut down
206+
* [`:restart`](`m:Supervisor#module-restart-values-restart`) - when the
207+
child should be restarted, defaults to `:permanent`
208+
* [`:shutdown`](`m:Supervisor#module-shutdown-values-shutdown`) - how to
209+
shut down the child, either immediately or by giving it time to shut down
208210
209211
For example:
210212
211213
use GenServer, restart: :transient, shutdown: 10_000
212214
213-
See the "Child specification" section in the `Supervisor` module for more
215+
See the ["Child specification"](`m:Supervisor#module-child_spec-1-function`) section in the `Supervisor` module for more
214216
detailed information. The `@doc` annotation immediately preceding
215217
`use GenServer` will be attached to the generated `child_spec/1` function.
216218

lib/elixir/lib/supervisor.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ defmodule Supervisor do
130130
to start the child process. This key is required.
131131
132132
* `:restart` - an atom that defines when a terminated child process
133-
should be restarted (see the "Restart values" section below).
133+
should be restarted (see the ["Restart values"](#module-restart-values-restart) section below).
134134
This key is optional and defaults to `:permanent`.
135135
136136
* `:shutdown` - an integer or atom that defines how a child process should
137-
be terminated (see the "Shutdown values" section below). This key
137+
be terminated (see the ["Shutdown values"](#module-shutdown-values-shutdown) section below). This key
138138
is optional and defaults to `5_000` if the type is `:worker` or
139139
`:infinity` if the type is `:supervisor`.
140140

0 commit comments

Comments
 (0)