std.concurrency: The fate of unmatched messages

E.S. Quinn via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 10 12:39:24 PDT 2015


I'm putting together a program that uses std.concurrency to 
handle two child threads from the main thread;

The kicker here is that both the children do very different 
things. And I would like to handle receive() calls for them in 
separate locations. But from what I can tell, each thread has 
only one mailbox. And none of the documentation i can find for 
std.concurrency mentions what happens when one receive() call 
gets a message it doesn't understand. Are unmatched messages left 
in the Mailbox, or are they discarded? (I am admittedly strongly 
hoping it is the former)

And if the latter, is there any way to actually give a single 
thread multiple mailboxes?


More information about the Digitalmars-d-learn mailing list