@@ -757,28 +757,28 @@ defmodule Registry do
757
757
In the example below we register the current process and look it up
758
758
both from itself and other processes:
759
759
760
- iex> Registry.start_link(keys: :unique, name: Registry.UniqueLookupTest )
761
- iex> Registry.values(Registry.UniqueLookupTest , "hello", self())
760
+ iex> Registry.start_link(keys: :unique, name: Registry.UniqueValuesTest )
761
+ iex> Registry.values(Registry.UniqueValuesTest , "hello", self())
762
762
[]
763
- iex> {:ok, _} = Registry.register(Registry.UniqueLookupTest , "hello", :world)
764
- iex> Registry.values(Registry.UniqueLookupTest , "hello", self())
763
+ iex> {:ok, _} = Registry.register(Registry.UniqueValuesTest , "hello", :world)
764
+ iex> Registry.values(Registry.UniqueValuesTest , "hello", self())
765
765
[:world]
766
- iex> Task.async(fn -> Registry.values(Registry.UniqueLookupTest , "hello", self()) end) |> Task.await()
766
+ iex> Task.async(fn -> Registry.values(Registry.UniqueValuesTest , "hello", self()) end) |> Task.await()
767
767
[]
768
768
iex> parent = self()
769
- iex> Task.async(fn -> Registry.values(Registry.UniqueLookupTest , "hello", parent) end) |> Task.await()
769
+ iex> Task.async(fn -> Registry.values(Registry.UniqueValuesTest , "hello", parent) end) |> Task.await()
770
770
[:world]
771
771
772
772
The same applies to duplicate registries:
773
773
774
- iex> Registry.start_link(keys: :duplicate, name: Registry.DuplicateLookupTest )
775
- iex> Registry.values(Registry.DuplicateLookupTest , "hello", self())
774
+ iex> Registry.start_link(keys: :duplicate, name: Registry.DuplicateValuesTest )
775
+ iex> Registry.values(Registry.DuplicateValuesTest , "hello", self())
776
776
[]
777
- iex> {:ok, _} = Registry.register(Registry.DuplicateLookupTest , "hello", :world)
778
- iex> Registry.values(Registry.DuplicateLookupTest , "hello", self())
777
+ iex> {:ok, _} = Registry.register(Registry.DuplicateValuesTest , "hello", :world)
778
+ iex> Registry.values(Registry.DuplicateValuesTest , "hello", self())
779
779
[:world]
780
- iex> {:ok, _} = Registry.register(Registry.DuplicateLookupTest , "hello", :another)
781
- iex> Enum.sort(Registry.values(Registry.DuplicateLookupTest , "hello", self()))
780
+ iex> {:ok, _} = Registry.register(Registry.DuplicateValuesTest , "hello", :another)
781
+ iex> Enum.sort(Registry.values(Registry.DuplicateValuesTest , "hello", self()))
782
782
[:another, :world]
783
783
784
784
"""
0 commit comments