Created
May 24, 2017 20:29
-
-
Save 6desislava6/2cbd92ee3dfb02d82c09783594a5e3d8 to your computer and use it in GitHub Desktop.
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
Lambda.Server.register(Test2, :wait) | |
task = fn(pid, seconds) -> | |
result = Lambda.Server.run(Test2, :wait, [seconds*1000]) | |
IO.puts 'result' | |
IO.inspect result | |
IO.puts 'send to' | |
IO.inspect pid | |
send(pid, result) | |
end | |
p = self() | |
ten_second_task = fn -> task.(p, 10) end | |
one_second_task = fn -> task.(p, 1) end | |
Process.spawn(ten_second_task, []) | |
Process.spawn(one_second_task, []) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment