Remove koans illustrating self-exit

I don't really like these examples, because the process would exit
anyway when the function returns... Also having to sleep is not ideal.
This commit is contained in:
Jay Hayes
2016-05-03 17:41:55 -05:00
parent cdfca2a24a
commit 322799a655
2 changed files with 0 additions and 15 deletions

View File

@@ -53,12 +53,6 @@ defmodule Processes do
assert_receive ___
end
koan "Killing a process will terminate it" do
pid = spawn(fn -> Process.exit(self, :kill) end)
:timer.sleep(500)
assert Process.alive?(pid) == ___
end
koan "You can also terminate processes other than yourself" do
pid = spawn(fn -> receive do end end)
@@ -93,13 +87,6 @@ defmodule Processes do
assert Process.alive?(pid) == ___
end
koan "Exiting normally yourself on the other hand DOES terminate you" do
pid = spawn(fn -> Process.exit(self, :normal) end)
:timer.sleep(100)
assert Process.alive?(pid) == ___
end
koan "Parent processes can trap exits for children they are linked to" do
Process.flag(:trap_exit, true)
spawn_link(fn -> Process.exit(self, :normal) end)