This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.




fifo(n)                                                                                              fifo(n)



____________________________________________________________________________________________________________

NAME
       fifo - Create and manipulate u-turn fifo channels

SYNOPSIS
       package require Tcl

       package require memchan

       fifo

____________________________________________________________________________________________________________

DESCRIPTION
       fifo   creates a stream-oriented in-memory channel and returns its handle. There is no restriction on
              the ultimate size of the channel, it will always grow as much as is  necessary  to  accomodate
              the data written into it.

              In contrast to the channels generated by memchan a channel created here effectively represents
              an U-turn. All data written into it can be read out, but only in the  same  order.  This  also
              means that a fifo channel is not seekable.

              The  channels  created  here  can  be  transfered  between interpreters in the same thread and
              between threads, but only as a whole. It is not possible to use them to create a bi- or unidi-rectional unidirectional
              rectional connection between two interpreters.


       Memory  channels  created by fifo provide two read-only options which can be queried via the standard
       fconfigure command. These are

       -length
              The value of this option is the number of bytes currently stored in the queried  memory  chan-nel. channel.
              nel.

       -allocated
              The  value  of  this  option  is the number of bytes currently allocated by the queried memory
              channel. This number is at least as big as the value of -length.


       As the channels generated by fifo grow as necessary they are  always  writable.  This  means  that  a
       writable fileevent-handler will fire continuously.

       The channels are also readable if they contain more than zero bytes. Under this conditions a readable
       fileevent-handler will fire continuously.

NOTES
       One possible application of memory channels created by memchan or fifo is as temporay storage  device
       to  collect data coming in over a pipe or a socket. If part of the processing of the incoming data is
       to read and process header bytes or similar fifo are easier to use as they  do  not  require  seeking
       back and forth to switch between the assimilation of headers at the beginning and writing new data at
       the end.

SEE ALSO
       fifo2, memchan, null

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

COPYRIGHT
       Copyright (c) 1996-2003 Andreas Kupries <andreas_kupries@users.sourceforge.net>




Memory channels                                      2.1                                             fifo(n)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...