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

Michael Klishin michael.s.klishin@REDACTED
Thu Aug 21 16:10:14 CEST 2014

On 21 August 2014 at 18:07:33, Daniil Churikov (ddosia@REDACTED) 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.

How would old messages get a chance at being processed at high message
rates, if the order wasn't FIFO? 
@michaelklishin, github.com/michaelklishin

More information about the erlang-questions mailing list