Manual Pages for UNIX Darwin command on man fifo2
MyWebUniversity

Manual Pages for UNIX Darwin command on man fifo2

fifo2(n) fifo2(n)

NAME

fifo2 - Create and manipulate pipe fifo channels

SYNOPSIS

package require TTccll package require mmeemmcchhaann ffiiffoo22

DESCRIPTION

The command described here is only available in a not-yet released ver-

sion of the package. Use the CVS to get the sources.

ffiiffoo22 creates two stream-oriented in-memory channels and returns their

handles as a two-element list. There is no restriction on the

ultimate size of the channels, they will always grow as much as is necessary to accomodate the data written into them. In contrast to the channels generated by ffiiffoo a pair of channels created here is connected internally in such a way that data written into one channel can be read from the other. All data written into them is read in the same order. This also means that the two channels of the pair are not seekable. The channels created here can be transfered between interpreters in the same thread and between threads. As both channels in the pair can be transfered independently they can be used to create a bidirectional connection between two interpreters.

Memory channels created by ffiiffoo22 provide two read-only options which

can be queried via the standard ffccoonnffiigguurree command. These are

-rlength

The value of this option is the number of bytes currently avail-

able for reading from the channel.

-wlength

The value of this option is the number of bytes currently writ-

ten into the channel. Note that the two lengths are switched for the channels of a pair. In other words, the number of bytes written for one of the channels is the number of bytes readable from the other end. As the channels generated by ffiiffoo22 grow as necessary they are always

writable. This means that a writable ffiilleeeevveenntt-handler will fire con-

tinuously. The channels are also readable if they contain more than zero bytes.

Under this conditions a readable ffiilleeeevveenntt-handler will fire continu-

ously.

SEE ALSO

fifo, memchan, null KKEEYYWWOORRDDSS

channel, fifo, i/o, in-memory channel, memchan, stream

COPYRIGHT

Copyright (c) 1996-2003 Andreas Kupries

Memory channels 2.2 fifo2(n)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™