Parallel Combinator#

The parallel combinator is used to execute Orc expressions concurrently.


EBNF: E ::= ... | . E | E

Precedence: parallel > pruning > otherwise

Associativity: left and right

Commutative: true


  • F | G

Orc executes the expression F | G by executing F and G concurrently. Whenever F or G communicates with a service or publishes a value, F | G does so as well. The resulting publications of F | G may be published in arbitrary order.


Example 1#

-- Publish 1 and 2 in parallel
-- Note the publication order may be either 1 then 2 or 2 then 1
1 | 1+1

Example 2#

    Access two search sites, Google and Yahoo, in parallel.
    Publish any results they return.
    Since each call may publish a value, the expression
    may publish up to two values.
Google("cupcake") | Yahoo("cupcake")

Related Reference Topics#

Related Tutorial Sections#

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-3) was last changed on 20-Sep-2013 10:44 by JohnThywissen