Thanks Matt,<br><br>I feel a bit silly now for not having read the FAQ :) relying on google a bit too much...<br clear="all"><br><br><div class="gmail_quote">On Fri, Jun 27, 2008 at 5:44 PM, Matthias Lang <<a href="mailto:matthias@corelatus.se">matthias@corelatus.se</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Fri, Jun 27, 2008 at 11:47:58AM +1200, Fuad Tabba wrote:<br>
> I was wondering, when sending messages in Erlang, is ordering preserved?<br>
> i.e. Process A sends 1 then 2 to B; can I count on B receiving 1 before<br>
> receiving 2 (not talking about selective receive).<br>
<br>
</div>From the FAQ:<br>
<br>
10.9 Is the order of message reception guaranteed?<br>
<br>
Yes, but only within one process.<br>
<br>
If there is a live process and you send it message A and then message<br>
B, it's guaranteed that if message B arrived, message A arrived before<br>
it.<br>
<br>
On the other hand, imagine processes P, Q and R. P sends message A to<br>
Q, and then message B to R. There is no guarantee that A arrives<br>
before B. (Distributed Erlang would have a pretty tough time if this<br>
was required!)<br>
<div class="Ih2E3d"><br>
> What about reliability? Assuming that there aren't faulty processes or<br>
> broken links (slow is ok), is it possible for some messages to be dropped by<br>
> others not? To use the same example, A send 1 then 2, is it possible for B<br>
> to only receive 2?<br>
<br>
</div>Covered in the next question in the FAQ. Start reading here:<br>
<br>
<a href="http://www.erlang.org/faq/academic.html#10.9" target="_blank">http://www.erlang.org/faq/academic.html#10.9</a><br>
<br>
Matt<br>
</blockquote></div><br>