Memchan


 

fifo

SourceForge Logo

Memchan Logo

Tcl Logo

 Crossreferences

Memchan SF Project

Homepage
Releases
Logos
Animations
Documentation
ChangeLog
© Disclaimer
Event generation


Manpages

fifo
fifo2
memchan
null
random
 

Memory channels 2.1 -- 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 unidirectional 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 channel.
-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

memchan, fifo2, null

KEYWORDS

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

Last updated @ Mon Jan 20 14:15:59 PST 2003
Manpages now available   andreas_kupries - 2001-09-06 23:27
Memchan CVS   andreas_kupries - 2001-08-28 08:58
Tracker Tracker

 - Bugs ( 2 open / 5 total )
Bug Tracking System

 - Support Requests ( 1 open / 1 total )
Tech Support Tracking System

 - Patches ( 0 open / 2 total )
Patch Tracking System

 - Feature Requests ( 7 open / 8 total )
Feature Request Tracking System


Docs Doc Manager
Mail Lists Mailing Lists ( 2 mailing lists )
Tasks Task Manager
  - Documentation
  - Website
  - Memchan Dev
CVS CVS Tree ( 168 commits, 68 adds )
FTP Released Files

Andreas Kupries
Last update at Mon Jan 20 14:21:49 PST 2003