Last active
September 20, 2019 12:43
-
-
Save jbruggem/e3ef710ecc3081d2feea90c84266d6f5 to your computer and use it in GitHub Desktop.
Elixir running processes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
("================\n" | |
<> (Process.list() | |
|> Enum.map(&Process.info/1) | |
|> Enum.map(&(&1 |> Access.get(:registered_name))) | |
|> Enum.filter(&(&1)) | |
|> Enum.join("\n")) | |
<> "\n================") | |
|> IO.puts() | |
########## one-line | |
Process.list |> Enum.map( fn pid -> Process.info( pid, [:registered_name]) |> Keyword.get(:registered_name) end) |> Enum.filter(&is_atom/1) |> Enum.each(&IO.puts/1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment