Updated 2016-07-24 06:06:55 by pooryorick

pipethread is a module by rkeene that implements thread-based concurrency and parallelism. It gives you the | from sh in Tcl, for Tcl code.

Use examples  edit

proc a {inchan outchan} { puts $outchan blah }
pipethread::pipe a | { gets $inchan line; puts $outchan "[string length $line]:$line" }

set output [pipethread::pipe exec ls | foreach line { puts $outchan "-->$line<--" }]

pipethread::pipe -outchan stdout -- exec ls | foreach line { puts $outchan "-->$line<--" }

Discussion  edit

PYK {2016 07 24}: SCSH is a related contraption for Scheme.