<br><br><div><span class="gmail_quote">On 9/6/07, <b class="gmail_sendername">Peter William Lount</b> &lt;<a href="mailto:peter@smalltalk.org">peter@smalltalk.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I am wondering if the following would be possible and if so how?<br><br>aProcess := [ &quot;a block that pumps out continuous values&quot;] fork.<br>bProcess := [:in | in someOperation ] fork.<br><br>&quot;pipe the results of process a into process b like in unix shell&quot;
<br>aProcess asPipeInto: bProcess.<br><br>or<br><br>aProcess | bProcess<br><br></blockquote><div><br>It&#39;s easier to do it directly.<br><br>keepGoing := true.<br>s := SharedQueue new.<br>[ 1 to: 100 do: [ :each | s nextPut: each ] ] fork.
<br>[ [keepGoing] whileTrue: [Transcript show: s next asString, &#39; &#39;]. ] fork.<br><br>And then: <br>keepGoing := false. &quot;To stop the second process.&quot;<br><br>The SharedQueue acts like the pipe. You could make your own class to add a layer of abstraction, but this would only be worthwhile if you are having difficulty with the complexity. 
<br><br>Michael.<br></div></div><br><br><br>