/* Four place queue using internal communications */ const dw = 8; void main(chan (in) c4 : dw, chan (out) c0 : dw) { int d0, d1, d2, d3; chan c1, c2, c3; void e0() { while (1) { c1 ? d0; c0 ! d0; } } void e1() { while (1) { c2 ? d1; c1 ! d1; } } void e2() { while (1) { c3 ? d2; c2 ! d2; } } void e3() { while (1) { c4 ? d3; c3 ! d3; } } par { e0(); e1(); e2(); e3(); } }