[erlang-questions] erlang:process_info(Pid, messages) result order

Daniil Churikov ddosia@REDACTED
Thu Aug 21 16:07:23 CEST 2014

Hello, I just spotted one counterintuitive thing for me: when you send
messages to process,
and then access it's mailbox via erlang:process_info(Pid, messages), all
messages you sent
is in the same order, oldest messages in the list's head!


self() ! m1,
self() ! m2,
self() ! m3,
{messages,[m1,m2,m3]} = erlang:process_info(self(), messages).

My expectations was that newest messages will be at the head of the list.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140821/2c742ade/attachment.htm>

More information about the erlang-questions mailing list