Simplify example
This commit is contained in:
@@ -88,12 +88,7 @@ defmodule Processes do
|
|||||||
end
|
end
|
||||||
|
|
||||||
koan "Exiting yourself on the other hand DOES terminate you" do
|
koan "Exiting yourself on the other hand DOES terminate you" do
|
||||||
pid = spawn(fn -> receive do
|
pid = spawn(fn -> Process.exit(self, :normal) end)
|
||||||
:bye -> Process.exit(self(), :normal)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
send pid, :bye
|
|
||||||
:timer.sleep(100)
|
:timer.sleep(100)
|
||||||
assert Process.alive?(pid) == ___
|
assert Process.alive?(pid) == ___
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user