Remove indirection of wait/0
This commit is contained in:
@@ -69,7 +69,11 @@ defmodule Processes do
|
|||||||
{:EXIT, _pid, reason} -> send parent, {:exited, reason}
|
{:EXIT, _pid, reason} -> send parent, {:exited, reason}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
wait()
|
|
||||||
|
receive do
|
||||||
|
:ready -> true
|
||||||
|
end
|
||||||
|
|
||||||
Process.exit(pid, :random_reason)
|
Process.exit(pid, :random_reason)
|
||||||
|
|
||||||
assert_receive ___
|
assert_receive ___
|
||||||
@@ -118,10 +122,4 @@ defmodule Processes do
|
|||||||
|
|
||||||
assert_receive ___
|
assert_receive ___
|
||||||
end
|
end
|
||||||
|
|
||||||
def wait do
|
|
||||||
receive do
|
|
||||||
:ready -> true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user