Oberon || Library || Module Index || Search Engine || Definition || Module


Ulm's Oberon Library:
PipeReaders


NAME

PipeReaders - read and buffer input from pipelines

SYNOPSIS

PROCEDURE Spawn(VAR s: Streams.Stream; pipe: Streams.Stream);

DESCRIPTION

PipeReaders provides a Streams implementation that continuously reads all available input from a given stream, buffers it, and makes it available as soon as it is convenient to process it. This allows to avoid deadlocks in case where the producer could get suspended because its output is not consumed.

This module preserves the input packets (see Streams.ReadPacket) as long their size does not exceed the internal buffer size. StreamConditions is supported.

Spawn spawns off a task that reads from pipe and makes its input available through s. This task will run until s is closed.

DIAGNOSTICS

Error events are forwarded from pipe to s.

SEE ALSO

UnixPipes
create pipelines to other processes

Edited by: borchert, last change: 2006/08/10, revision: 1.2, converted to HTML: 2006/08/10

Oberon || Library || Module Index || Search Engine || Definition || Module