Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96f3dee

Browse files
authored
Update dynamic-supervisor.markdown (elixir-lang#1617)
Ads a small note about the purpose of `Supervisor` and `DynamicSupervisor` based on the previous improvements made elixir-lang/elixir#11970 and elixir-lang/elixir#11973.
1 parent ad21c51 commit 96f3dee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

getting-started/mix-otp/dynamic-supervisor.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Since the bucket terminated, the registry also stopped, and our test fails when
4646
test/kv/registry_test.exs:33: (test)
4747
```
4848

49-
We are going to solve this issue by defining a new supervisor that will spawn and supervise all buckets. Opposite to the previous Supervisor we defined, the children are not known upfront, but they are rather started dynamically. For those situations, we use a `DynamicSupervisor`. The `DynamicSupervisor` does not expect a list of children during initialization; instead each child is started manually via `DynamicSupervisor.start_child/2`.
49+
We are going to solve this issue by defining a new supervisor that will spawn and supervise all buckets. Opposite to the previous Supervisor we defined, the children are not known upfront, but they are rather started dynamically. For those situations, we use a supervisor optimized to such use cases called `DynamicSupervisor`. The `DynamicSupervisor` does not expect a list of children during initialization; instead each child is started manually via `DynamicSupervisor.start_child/2`.
5050

5151
## The bucket supervisor
5252

0 commit comments

Comments
 (0)