Message passing in Elixir processes - part 2
when terminal hangs waiting for a message in OTP
Yesterday I attended an Elixir meetup where they were demonstrating how we send a message and receive it using receive block.
This demo was shown referring to Documentation.
During demo I saw a screen which was hanged because no message received.
To continue, presentor pressed ctrl + c
twice and forcefully stopped the process and started iex again.
In this post we see more advance part of message passing. When terminal hangs waiting for message, how to send a message to that process.
This is my journey about what all I tried and the learnings.
example for other
hanged / waiting for a message
Now I started once again, keeping in mind I want to send message from another process.
So we have everything like before.
Let us try to send a message from another terminal.
received message to cookie from cake
Now let us again make it wait for messages
waiting for messages
sent message from Cake
This might be a little confusing, let me try to create a Video recording that will be more easy to understand.