Skip to content

Instantly share code, notes, and snippets.

@garyharan
Created September 27, 2018 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garyharan/67363db1ffe965dd00922c4699e15af9 to your computer and use it in GitHub Desktop.
Save garyharan/67363db1ffe965dd00922c4699e15af9 to your computer and use it in GitHub Desktop.
How to calculate maximum number of processes in Elixir
0..1_000_000
|> Enum.each(fn(_n) ->
IO.puts "Creating process: #{Process.list |> Enum.count}"
spawn(fn -> Process.sleep(:infinity)
end)
end)
@osbre
Copy link

osbre commented Jan 20, 2023

It's 262144 by default

@garyharan
Copy link
Author

TIL! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment