tcl::chan::fifo(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– tcl::chan::fifo β€” the in-memory fifo channel πŸ’–

okay bestie so real talk, this page lives in the Reflected/virtual channel support section of the manual, and the page itself is tcl::chan::fifo(n). Let's get into it, no cap.


✨ NAME ✨

tcl::chan::fifo β€” an in-memory fifo channel, literally just vibing in your RAM 🧠✨


πŸŽ€ SYNOPSIS πŸŽ€

package require Tcl 8.5 9

package require TclOO

package require tcl::chan::events ?1.1?

package require tcl::chan::fifo ?1.1?

::tcl::chan::fifo

🌸 DESCRIPTION 🌸

The tcl::chan::fifo package hands you a command that makes channels which exist purely in memory β€” no disk, no filesystem, just vibes πŸ¦‹. Access is fifo-like, which means things get read out of the channel in the exact order they were written into it. First in, first out, the way the universe intended. πŸ‘‘

This is equivalent to the fifo channels that the Memchan package gives you, with one iconic plot twist: this one is written in pure Tcl, not C. So cute. But bestie, be aware of the tradeoff β€” Memchan is usable with Tcl 8.4 and before, whereas this package needs Tcl 8.5 or higher, plus TclOO. that's the deal, take it or leave it πŸ’…

Also fyi, the internal TclOO class that actually implements the channel handler is a sub-class of the tcl::chan::events framework. it's giving legacy, it's giving inheritance 😌


πŸ’… API πŸ’…

  • ::tcl::chan::fifo β€” this command creates a brand new fifo channel and hands you back its handle. that's it. that's the whole API. slay ✨

😭 BUGS, IDEAS, FEEDBACK 😭

Not to be dramatic but this document, and the package it describes, will undoubtedly contain bugs and other problems. it's giving humble, it's giving honest 🫢 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 β€” we want all of it, fr fr.

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. yes it's a whole journey but it's worth it πŸ™ˆ

πŸ”₯ KEYWORDS πŸ”₯

fifo, in-memory channel, reflected channel, tip 219, virtual channel


🌈 CATEGORY 🌈

Channels


Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>


and that's the whole page bestie, we ate and left no crumbs πŸ’– this one's from tcllib, version 1.1, and it's tcl::chan::fifo(n) β€” periodt, stan, go build an in-memory fifo πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from