Elixir Concurrency
Concurrency
defmodule Wait do
def hello do
receive do
x -> IO.puts("aaa! surprise, a message: #{x}")
end
end
endiex(1)> c("wait.ex")
[Wait]
iex(2)> p = spawn(Wait, :hello, [])
#PID<0.92.0>iex(3)> send p, "hello"
...Tic-Tac-Toe
Last updated