Hello World,
I am new to Elixir.
I am learning from this Elixir on my Ubuntu host:
$ elixir -v
Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:4:4]
[ds:4:4:10] [async-threads:1] [hipe]
Elixir 1.9.0 (compiled with Erlang/OTP 21)
$
I am confused by the behavior of a receive-block I wrote.
I typed some syntax into iex:
self()
# #PID<0.103.0>
receive do int1 -> int1 end
At that point iex “hung” which makes sense to me because the
receive-block is waiting for a message.
And that behavior matches my understanding of h(receive).
I started another iex session and sent a message to the receive-block:
apid = pid(0,103,0)
send apid, 55
I expected the receive-block to accept the message and then return
the iex-prompt to me.
But, it remained “hung”.
Q: Should I expect the receive-block to accept the message and then return
the iex-prompt to me?