[dmd-concurrency] Pattern matching on message receives, error handling

Andrei Alexandrescu andrei at erdani.com
Tue Jan 19 12:27:24 PST 2010


Kevin Bealer wrote:
> If I do this syntax:
>  
> auto dg1 = void delegate(A x) { ... };
> auto dg2 = void delegate(B x) { ... };
>  
> receive(dg1, dg2);
>  
> Does this mean receive anything that matches dg1, and if nothing is 
> found, receive anything that matches dg2?  Or does it mean to take the 
> first message in order that matches either one?

I think (and I'm trying to clarify in the latest draft) that we're 
looking at a first-match model that is checked during compilation.

Andrei


More information about the dmd-concurrency mailing list