diff options
author | Eric Meadows-Jönsson <eric.meadows.jonsson@gmail.com> | 2019-07-02 21:59:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-02 21:59:52 +0200 |
commit | 6edec0b7fcc67123da62c0f4ec24686db90cf6a1 (patch) | |
tree | 78d99c4647e120821950950f73644035cf88fdb2 | |
parent | f39a212800697d389bd2f87ec5cb5eb444cc6db2 (diff) | |
download | elixir-6edec0b7fcc67123da62c0f4ec24686db90cf6a1.tar.gz |
Apply suggestions from code review
Co-Authored-By: José Valim <jose.valim@gmail.com>
-rw-r--r-- | lib/elixir/lib/registry.ex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/elixir/lib/registry.ex b/lib/elixir/lib/registry.ex index 4237b4b4a..ee19f55f1 100644 --- a/lib/elixir/lib/registry.ex +++ b/lib/elixir/lib/registry.ex @@ -1320,7 +1320,10 @@ defmodule Registry.Supervisor do key_partition = Registry.Partition.key_name(registry, i) pid_partition = Registry.Partition.pid_name(registry, i) arg = {kind, registry, i, partitions, key_partition, pid_partition, listeners} - Supervisor.child_spec({Registry.Partition, [pid_partition, arg]}, id: pid_partition) + %{ + id: pid_partition, + start: {Registry.Partition, :start_link, [pid_partition, arg]} + } end Supervisor.init(children, strategy: strategy_for_kind(kind)) @@ -1369,7 +1372,7 @@ defmodule Registry.Partition do The process is only responsible for monitoring, demonitoring and cleaning up when monitored processes crash. """ - def start_link([registry, arg]) do + def start_link(registry, arg) do GenServer.start_link(__MODULE__, arg, name: registry) end |