Skip to content
This repository was archived by the owner on Apr 11, 2019. It is now read-only.

Commit a0f1217

Browse files
author
José Valim
committed
Use ets member instead of select_count
1 parent eb67651 commit a0f1217

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/registry.ex

+2-3
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,8 @@ defmodule Registry do
683683
end
684684

685685
defp unlink_if_unregistered(pid_server, pid_ets, self) do
686-
case :ets.select_count(pid_ets, [{{self, :_, :_}, [], [true]}]) do
687-
0 -> Process.unlink(pid_server)
688-
_ -> :ok
686+
unless :ets.member(pid_ets, self) do
687+
Process.unlink(pid_server)
689688
end
690689
end
691690
end

0 commit comments

Comments
 (0)