Created
January 29, 2019 22:00
-
-
Save paulruescher/336949bb68fb48b3c49b741b76c95183 to your computer and use it in GitHub Desktop.
Spins up "concurrent" tasks
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
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