Version 1 of pipethread

Updated 2016-04-25 15:05:56 by RoyKeene

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

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