Next: , Previous: CHP Wait, Up: CHP Statements


14.3.4 Composition

CHP statements may be composed either sequentially or concurrently.

Concurrent composition has higher precedence than sequential composition, so X,Y;Z is interpreted as (X,Y);Z. However, one may explictly parenthesize X,(Y;Z).

Execution of concurrent branches behaves like a fork and join (barrier). Upon initial execution, each branch is begun concurently, but the execution is not completely until all branches have reached the join-barrier. (This can be easily implemented as a decrementing barrier counter.)