| … | … | @@ -186,6 +186,19 @@ |
| 186 | 186 | ; Sniff test. Does it work? |
| 187 | 187 | ; (cog-execute! counted-stream) |
| 188 | 188 | |
| 189 | ; -------------------------------------------------------- |
| 190 | ; The demo above always shows one step at a time. In practice, |
| 191 | ; one will want to just run the pipeline until it completes, |
| 192 | ; or perhaps run it forever, if the sream is endless. This can be |
| 193 | ; accomplished with the DrainLink. It will loop forever, until |
| 194 | ; it encounters a VoidValue, or a LinkValue of zero length, and |
| 195 | ; the it will return. |
| 196 | ; |
| 197 | ; Like so: |
| 198 | (cog-execute! (Drain counted-stream)) |
| 199 | |
| 200 | ; For an infinite stream, it can be run in it's own thread: |
| 201 | (cog-execute! (Parallel (Drain counted-stream))) |
| 189 | 202 | |
| 190 | 203 | ; -------------------------------------------------------- |
| 191 | 204 | ; The End! That's All, Folks! |