Skip to content

Instantly share code, notes, and snippets.

@cybrox
Last active April 30, 2019 11:37
Show Gist options
  • Save cybrox/44ce5d5171a926f4cb91b513755ea23a to your computer and use it in GitHub Desktop.
Save cybrox/44ce5d5171a926f4cb91b513755ea23a to your computer and use it in GitHub Desktop.
ex-mag4.ex
worker_function = fn ->
:timer.sleep(1_000)
IO.puts("completed at #{:erlang.system_time()}")
end
Pragmatic.supervisor(worker_function)
#> completed at 1556621845035672000
#> completed at 1556621846038645599
#> completed at 1556621847039733259
#> ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment