Actually illustrate use of receive function
This commit is contained in:
@@ -19,7 +19,10 @@ defmodule Processes do
|
|||||||
|
|
||||||
koan "You can send messages to any process you want" do
|
koan "You can send messages to any process you want" do
|
||||||
send self(), "hola!"
|
send self(), "hola!"
|
||||||
assert_receive ___
|
|
||||||
|
receive do
|
||||||
|
msg -> assert msg == ___
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
koan "A common pattern is to include the sender in the message" do
|
koan "A common pattern is to include the sender in the message" do
|
||||||
|
|||||||
Reference in New Issue
Block a user