Created
March 24, 2020 19:45
-
-
Save alexandreservian/c6b8886512ae52b9a3c5860b89e640c8 to your computer and use it in GitHub Desktop.
Usando StackSupervisor no iex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex> StackSupervisor.start_link | |
{:ok, #PID<0.230.0>} | |
iex> StackSupervisor.which_children | |
[ | |
{ProcessInElixir.StackNormal, #PID<0.231.0>, :worker, | |
[ProcessInElixir.StackNormal]} | |
] | |
iex> ProcessInElixir.StackNormal.push pid(0,231,0), "Japão" | |
{:push, "Japão"} | |
iex> ProcessInElixir.StackNormal.show pid(0,231,0) | |
["Japão"] | |
iex> ProcessInElixir.StackNormal.raiseProcess pid(0,231,0) | |
{:raise} | |
iex> StackSupervisor.which_children | |
[ | |
{ProcessInElixir.StackNormal, #PID<0.237.0>, :worker, | |
[ProcessInElixir.StackNormal]} | |
] | |
iex> ProcessInElixir.StackNormal.show pid(0,237,0) | |
[] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment