1.1 --- a/docs/reference.html Thu Jun 04 22:28:43 2009 +0200
1.2 +++ b/docs/reference.html Fri Jun 05 01:46:07 2009 +0200
1.3 @@ -333,6 +333,32 @@
1.4 <p>This wraps the callable in a similar fashion to <code>MakeParallel</code>, but
1.5 provides the necessary mechanisms described above for reusable code.</p>
1.6
1.7 +<h2 id="Continuous">Continuous Processes and Channels</h2>
1.8 +
1.9 +<p>Much of the usage of exchanges so far has concentrated on processes which
1.10 +are created, whose callables are invoked, and then, once those callables have
1.11 +returned, either they are invoked again in the same process (when reused) or
1.12 +in a new process (when not reused). However, the underlying mechanisms
1.13 +actually support processes whose callables not only receive input at the start
1.14 +of their execution and send output at the end of their execution, but may
1.15 +provide output on a continuous basis (similar to iterator or generator
1.16 +objects).</p>
1.17 +
1.18 +<p>To enable support for continuous communications between processes, a
1.19 +keyword argument must be specified when creating an <code>Exchange</code>
1.20 +instance (or an instance of a subclass of <code>Exchange</code> such as
1.21 +<code>Map</code> or <code>Queue</code>):</p>
1.22 +
1.23 +<pre>
1.24 +exchange = MyExchange(limit=10, continuous=1) # support up to 10 processes
1.25 +</pre>
1.26 +
1.27 +<p>Code invoked in this mode of communication must be aware of channels, since
1.28 +it will need to explicitly send data via a channel to the creating process,
1.29 +instead of terminating and sending data only once (as would be done
1.30 +automatically using convenience classes such as
1.31 +<code>MakeParallel</code>).</p>
1.32 +
1.33 <h2 id="BackgroundCallable">Background Processes and Callables</h2>
1.34
1.35 <p>So far, all parallel computations have involved created processes which