chan pipe
Makes a pipe and gives its two channels.
chan pipe
Description
Gives a list of two channels: the bytes that go into the second one come out of the first one. Close the second one to end the data of the first one.
Returns
A list of the read channel and the write channel.
Examples
% lassign [chan pipe] r w
> chan puts $w hi; chan flush $w
> set l [chan gets $r]
> chan close $w; chan close $r
> set l
hi
Errors
% chan pipe x
wrong # args: should be "chan pipe "
-errorcode TCL WRONGARGS
Facts
- Capability
channels. A new interpreter does not have it until the host turns it on.- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1