diff options
author | Eric Meadows-Jönsson <eric.meadows.jonsson@gmail.com> | 2019-06-28 16:23:24 +0200 |
---|---|---|
committer | Eric Meadows-Jönsson <eric.meadows.jonsson@gmail.com> | 2019-06-28 16:23:24 +0200 |
commit | 6482484d1207afabd5b4402ad8423ed52dc4c657 (patch) | |
tree | f57d6f3c22f949d5cf0f45b929a731eeb574c6f8 | |
parent | 05bf681a22bfd7f15978ec881b1a7b66bc854f5b (diff) | |
download | elixir-6482484d1207afabd5b4402ad8423ed52dc4c657.tar.gz |
Fix deprecation warning
-rw-r--r-- | lib/elixir/lib/registry.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/elixir/lib/registry.ex b/lib/elixir/lib/registry.ex index c11f81dd2..4237b4b4a 100644 --- a/lib/elixir/lib/registry.ex +++ b/lib/elixir/lib/registry.ex @@ -1320,10 +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} - worker(Registry.Partition, [pid_partition, arg], id: pid_partition) + Supervisor.child_spec({Registry.Partition, [pid_partition, arg]}, id: pid_partition) end - supervise(children, strategy: strategy_for_kind(kind)) + Supervisor.init(children, strategy: strategy_for_kind(kind)) end # Unique registries have their key partition hashed by key. @@ -1369,7 +1369,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 |