https://chiselapp.com/user/rkeene/repository/pipethread/%|%pipethread%|% is a module by [rkeene] that implements [thread]-based concurrency '''and''' parallelism. It gives you the `|` from [sh] in Tcl, for Tcl code. Tcl 2016 Presentation: * http://www.rkeene.org/tmp/pipethread-presentation.pdf%|%Tcl 2016 Presentation%|% * http://www.rkeene.org/tmp/pipethread-presentation-withnotes.pdf%|%Tcl 2016 Presentation with notes%|% ** 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 ** [PYK] {2016 07 24}: [https://scsh.net/%|%SCSH] is a related contraption for [Scheme]. <>Concurrency | Threads