Memchan


 

fifo2

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.2 -- fifo2(n)

NAME

fifo2 - Create and manipulate pipe fifo channels

SYNOPSIS

package require Tcl
package require memchan

fifo2

DESCRIPTION

The command described here is only available in a not-yet released version of the package. Use the CVS to get the sources.

fifo2
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 fifo 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 fifo2 provide two read-only options which can be queried via the standard fconfigure command. These are

-rlength
The value of this option is the number of bytes currently available for reading from the channel.
-wlength
The value of this option is the number of bytes currently written 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 fifo2 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.

SEE ALSO

memchan, fifo, 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:51 PST 2003