Skip to content

Commit 6564e3d

Browse files
authored
Use process dict directly (#12599)
1 parent 4fc5b77 commit 6564e3d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/elixir/lib/task/supervised.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,8 @@ defmodule Task.Supervised do
7070
end
7171

7272
defp get_ancestors() do
73-
with {:dictionary, dictionary} <- Process.info(self(), :dictionary),
74-
{:"$ancestors", ancestors} <- :lists.keyfind(:"$ancestors", 1, dictionary) do
75-
[self() | ancestors]
76-
else
73+
case :erlang.get(:"$ancestors") do
74+
ancestors when is_list(ancestors) -> [self() | ancestors]
7775
_ -> [self()]
7876
end
7977
end

0 commit comments

Comments
 (0)