Skip to content

Instantly share code, notes, and snippets.

@paulruescher
Created January 29, 2019 22:00
Show Gist options
  • Save paulruescher/336949bb68fb48b3c49b741b76c95183 to your computer and use it in GitHub Desktop.
Save paulruescher/336949bb68fb48b3c49b741b76c95183 to your computer and use it in GitHub Desktop.
Spins up "concurrent" tasks
defmodule Spawner do
def process() do
receive do
after
1_000 ->
IO.puts "1 seconds elapsed"
for i <- 0..40, i > 0 do
Task.start(ModuleName, :func_name, [[key: value]])
end
process()
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment