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

Leonid Shifrin <>
Sat Aug 23 17:04:59 CEST 2014


Hello! Any plans for labor day weekend?
-Thanks Leonid
On Aug 21, 2014 10:07 AM, "Daniil Churikov" <> wrote:

> 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!
>
> Example:
>
> 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.
>
> Thanks.
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140823/1b09cd5c/attachment.html>


More information about the erlang-questions mailing list