zero(3tcl)

πŸ“¦
version 2.3 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ NAME πŸŽ€

zero β€” create and manipulate zero channels, bestie πŸ’–


✨ SYNOPSIS ✨

package require Tcl

package require memchan

zero

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first things first, and this is important: the command described right here is only available in a not-yet released version of the package. Like, it's not out yet. If you want the sources you gotta use the CVS. That's the vibe. πŸ™ˆ

zero creates a zero channel, and what does a zero channel do? It absorbs literally everything you write into it. Every single byte. Gone. Swallowed. It's giving black hole but make it Tcl πŸ’€

And reading from a zero channel? It returns the requested number of null bytes. As many as you asked for, all of them null, no notes.

These channels are essentially Tcl-specific variants of the zero device for unixoid operating systems β€” you know, /dev/zero, the icon πŸ‘‘

One lil thing though: transferring the generated channel between interpreters is possible but does not make much sense. So like, you can, but why would you, bestie 😭


πŸ’… OPTIONS πŸ’…

Memory channels created by zero provide one additional option to set or query. Just the one. Slay.

  • -delay ?milliseconds? β€” okay so here's the tea: a zero channel is always writable and readable. Which means all fileevent-handlers will fire continuously πŸ”₯πŸ”₯ To avoid starvation of other event sources, the events raised by this channel type have a configurable delay. This option is set in milliseconds and defaults to 5. So yes, there's a lil built-in breather so your other event sources don't get absolutely starved out 🫢

🌈 SEE ALSO 🌈

fifo, fifo2, memchan, null, random


⭐ KEYWORDS ⭐

channel, i/o, in-memory channel, null, zero


Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>


and that's the whole page, bestie β€” this was the zero(3tcl) manual, living under the Memory channels umbrella, version 2.2 πŸ¦‹βœ¨

πŸ“¦ where this page comes from