1tcl::chan::fifo2(n)    Reflected/virtual channel support   tcl::chan::fifo2(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       tcl::chan::fifo2 - In-memory interconnected fifo channels
9

SYNOPSIS

11       package require Tcl  8.5
12
13       package require TclOO
14
15       package require tcl::chan::events  ?1?
16
17       package require tcl::chan::halfpipe  ?1?
18
19       package require tcl::chan::fifo2  ?1?
20
21       ::tcl::chan::fifo2
22
23______________________________________________________________________________
24

DESCRIPTION

26       The tcl::chan::fifo2 package provides a command creating pairs of chan‐
27       nels which live purely in memory and are connected to each other  in  a
28       fifo  manner.  What is written to one half of the pair can be read from
29       the other half, in the same order. One particular application for  this
30       is  communication  between  threads, with one half of the pair moved to
31       the thread to talk to.  This is equivalent to the fifo2  channels  pro‐
32       vided  by the package Memchan, except that this is written in pure Tcl,
33       not C. On the other hand, Memchan is usable with Tcl  8.4  and  before,
34       whereas this package requires Tcl 8.5 or higher, and TclOO.
35
36       The  internal  TclOO  class  implementing the channel handler is a sub-
37       class of the tcl::chan::events framework.
38

API

40       ::tcl::chan::fifo2
41              This command creates a new connected pair of fifo  channels  and
42              returns their handles, as a list containing two elements.
43

BUGS, IDEAS, FEEDBACK

45       This  document,  and the package it describes, will undoubtedly contain
46       bugs and other problems.  Please report such in the category  virtchan‐
47       nel  of  the  Tcllib  Trackers  [http://core.tcl.tk/tcllib/reportlist].
48       Please also report any ideas for enhancements you may have  for  either
49       package and/or documentation.
50
51       When proposing code changes, please provide unified diffs, i.e the out‐
52       put of diff -u.
53
54       Note further that  attachments  are  strongly  preferred  over  inlined
55       patches.  Attachments  can  be  made  by  going to the Edit form of the
56       ticket immediately after its creation, and  then  using  the  left-most
57       button in the secondary navigation bar.
58

KEYWORDS

60       connected  fifos,  fifo, in-memory channel, inter-thread communication,
61       reflected channel, tip 219, virtual channel
62

CATEGORY

64       Channels
65
67       Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
68
69
70
71
72tcllib                                 1                   tcl::chan::fifo2(n)
Impressum