Message passing pattern matching

Casper Færgemand" <shorttail at hotmail.com> Casper Færgemand" <shorttail at hotmail.com>
Wed Jan 29 13:50:25 PST 2014


A small example:

while (true) {
   receive(
     (Tid tid, AddTid _) {some code}
     (Tid tid, RemoveTid _) {some other code}
     (string s) {broadcast stuff}
   )
}

struct AddTid {}
struct RemoveTid {}


More information about the Digitalmars-d-learn mailing list