Why does std.concurrency.Mailbox use lists ?

Sean Kelly via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 9 15:34:08 PDT 2014


On Monday, 8 September 2014 at 17:24:53 UTC, Marc Schütz wrote:
>
> AFAICS, the documentation doesn't write about any ordering 
> guarantees of messages, but I can imagine that there are 
> implicit expectations. In particular prioritySend() could 
> break, if the implementation isn't done carefully.

The actor model imposes no requirement on the order of received
messages.  However, I want to try and guarantee that messages
will be received from a given sender in the order that they were
sent.  I think this is a much easier model to code to, and it's
what people expect.  It may be that at some point in the future
for some desirable communication protocol it will not be possible
to make this guarantee, but in that case the people who choose to
use that protocol can make an informed decision concerning the
tradeoffs.


More information about the Digitalmars-d mailing list