[erlang-questions] Do messages casted by Process A always get received before messages called by Process A?

Kris Rasmussen kris@REDACTED
Thu Oct 20 00:29:01 CEST 2011


Great. This is what I expected but I wanted to double check before I made a
change that depends on this behavior ;). Thanks.

On Wed, Oct 19, 2011 at 3:21 PM, Bob Ippolito <bob@REDACTED> wrote:

> On Wed, Oct 19, 2011 at 3:09 PM, Kris Rasmussen <kris@REDACTED> wrote:
> > Geoff, thanks for the response. I think I may have been ambiguous in my
> > wording. To be more specific, can you tell me if the following is true:
> > Imagine process A does the following:
> > call(B, 1)
> > cast(B, 2)
> > call(B, 3)
> > Will B always receive the messages in the order A sent them (1, 2, 3) as
> > opposed to something like (1, 3, 2) occasionally?
>
> From the FAQ [1]:
>
> 10.9  Is the order of message reception guaranteed?
>
> Yes, but only within one process.
>
> If there is a live process and you send it message A and then message
> B, it's guaranteed that if message B arrived, message A arrived before
> it.
>
> On the other hand, imagine processes P, Q and R. P sends message A to
> Q, and then message B to R. There is no guarantee that A arrives
> before B. (Distributed Erlang would have a pretty tough time if this
> was required!)
>
> [1] http://www.erlang.org/faq/academic.html#id56948
>
> -bob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111019/70f0b842/attachment.htm>


More information about the erlang-questions mailing list