tcl::chan::fifo2(3tcl)
β¨ tcl::chan::fifo2 β¨
okay bestie, you're in the tcl::chan::fifo2 page of the Reflected/virtual channel support manual (that's the 3tcl section, iykyk) π
and it's literally all about in-memory interconnected fifo channels. no cap. let's go π¦
πΈ NAME πΈ
tcl::chan::fifo2 β in-memory interconnected fifo channels π
β¨ SYNOPSIS β¨
package require Tcl 8.5 9
package require TclOO
package require tcl::chan::events ?1.1?
package require tcl::chan::halfpipe ?1.1?
package require tcl::chan::fifo2 ?1.1?
::tcl::chan::fifo2
like, that's the whole vibe right there π
π DESCRIPTION π
so the tcl::chan::fifo2 package hands you a command that creates pairs of channels that live purely in memory π§ β¨ and are connected to each other in a fifo manner. what you write into one half of the pair, you can read out of the other half β in the same order. first in, first out, periodt π
one particular application for this is communication between threads, where you move one half of the pair over to the thread you want to talk to π¬π«Ά
and like, this is equivalent to the fifo2 channels that the Memchan package provides β except this one is written in pure Tcl, not C π. on the other hand, Memchan is usable with Tcl 8.4 and before, whereas this package requires Tcl 8.5 or higher, and TclOO. so, tradeoffs, bestie π
also, the internal TclOO class implementing the channel handler is a sub-class of the tcl::chan::events framework π
π API π
::tcl::chan::fifo2β this command creates a new connected pair of fifo channels and returns their handles, as a list containing two elements πβ¨
π BUGS, IDEAS, FEEDBACK π
ngl, this document β and the package it describes β will undoubtedly contain bugs and other problems π. please report such in the category virtchannel of the Tcllib Trackers at [http://core.tcl.tk/tcllib/reportlist]. and please also report any ideas for enhancements you may have for either the package and/or the documentation π
when proposing code changes, please provide unified diffs, i.e. the output of diff -u π§
note further that attachments are strongly preferred over inlined patches. attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar π
π KEYWORDS π
connected fifos, fifo, in-memory channel, inter-thread communication, reflected channel, tip 219, virtual channel π¦
π CATEGORY π
Channels π‘
π COPYRIGHT π
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net> π
okay that's the whole page bestie, go build something iconic with it π«Άβ¨
and that's a wrap on this little chat β this was tcllib, version 1.1, of the tcl::chan::fifo2(3tcl) page, slay π
πΈ
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms