[erlang-questions] gen_server cast question
Ladislav Lenart
lenartlad@REDACTED
Wed Jan 31 18:46:32 CET 2007
Ulf Wiger wrote:
> Den 2007-01-31 17:20:33 skrev Logan, Martin <Martin.Logan@REDACTED>:
>
>> Message order is not guaranteed with asynchronous messaging in any case.
>> You should never rely on it. Also, as an aside, it would be strange to
>> have a reference to a process for a node that is not connected, that
>> suggests poor design.
>
> In Barklund's formal semantics for Erlang
> (http://citeseer.ist.psu.edu/fredlund01framework.html)
>
> the following is stated:
>
> "The semantics communication (rule com) is such that if two consecutive
> messages m1 and m2 are sent by process p1 to process
> p2 then message m1 will always arrive before message m2."
>
> I'm not sure where else it is defined, but I'm pretty sure that you can
> rely on this being true.
I also think that the order is guaranteed (between two processes that is):
[from Concurrent Programming in Erlang, page 69]
Messages are always delivered to the recipient,
and always in the same order they were sent.
But then I think that presence of spawn in do_send breaks this "rule"...
Ladislav Lenart
More information about the erlang-questions
mailing list