Parallel Combinator#

Orc executes the expression F | G, where F and G are Orc expressions, 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.

The parallel combinator is fully associative and commutative.

Syntax: E::= ... E | E

Usage: F | G

Exceptions: silent


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

    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")


Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-2) was last changed on 11-Oct-2010 15:27 by BMcCord