Are messages sent to self immediately delivered?

It will always return {:received, msg}, but msg is not necessarily what you have send before.

send is a synchronous operation, so it will not return before the message has been copied to the recipients mailbox, this means, that there will always something to receive. At the same time though, there might already be something in the mailbox when you did the send, then this will be received first as you receive unselectively.

6 Likes