[previous] [up] [next]     [index]
Next: String Ports Up: Ports Previous: Opening File Ports

Pipes

(make-pipe [limit-k]) returns two port values (see Chapter 2): the first port is an input port and the second is an output port. Data written to the output port is read from the input port. The ports do not need to be explicitly closed.

The optional limit-k argument can be #f or a positive exact integer. If limit-k is omitted or #f, the new pipe holds an unlimited number of unread characters (i.e., limited only by the available memory). If limit-k is a positive number, then the pipe will hold at most limit-k unread characters; writing to the pipe's output port thereafter will block until a read from the input port makes more space available.



PLT