I have two tabs open in my terminal, both of which have iex running on them. I know running
self on both the tabs would print their pid which returns the same pid.
In my tab1, I ran
receive do message -> IO.puts message end
Since there are no messages in the mailbox, it keeps waiting for the new one to come. Please correct me if I am wrong here.
So the tab1 is waiting for a message to come and in my tab 2, I run
send(self, "Hello world")
Going back to tab1, I dont see it printing the message in the terminal. How ? and Why?