Simplify example

This commit is contained in:
Jay Hayes
2016-05-02 18:56:01 -05:00
parent 2d7982e9a3
commit 8ea68548fe

View File

@@ -88,12 +88,7 @@ defmodule Processes do
end
koan "Exiting yourself on the other hand DOES terminate you" do
pid = spawn(fn -> receive do
:bye -> Process.exit(self(), :normal)
end
end)
send pid, :bye
pid = spawn(fn -> Process.exit(self, :normal) end)
:timer.sleep(100)
assert Process.alive?(pid) == ___
end