coroutine::auto(3tcl)

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

πŸ’– coroutine::auto β€” the Tcllib glow-up edition πŸ’–

okay bestie, so this page lives in the coroutine::auto corner of the 3tcl manual, under the whole Coroutine utilities umbrella. and literally the entire point of it is that it's the chillest package ever: it does stuff for you and never asks for credit. let's get into it 🫢


✨ NAME ✨

coroutine::auto β€” automatic event and IO coroutine awareness. yes, it's giving "i handle the vibes so you don't have to" πŸ’…


🌸 SYNOPSIS 🌸

package require Tcl 8.6 9
package require coroutine::auto 1.3
package require coroutine 1.4

that's the whole vibe. three little package require lines and you're in 🌈


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: the coroutine::auto package provides no commands or other directly visible functionality. not a single one. you will not find a coroutine::auto::something to call. she's a background character and she thrives there πŸ‘‘

what she actually does is lowkey iconic: built on top of the package coroutine, she intercepts various builtin commands of the Tcl core. why? so that any code using them becomes coroutine-oblivious β€” meaning it can run inside and outside of a coroutine, with zero changes. no edits, no if {[info coroutine] ne ""} brain damage, no nothing. it just works. ate πŸ’–

the commands so affected by this package are:

  • after
  • exit
  • gets
  • global
  • puts
  • read
  • socket
  • update
  • vwait

nine whole builtins, caught and handled, no cap. ✨


πŸ™ˆ BUGS, IDEAS, FEEDBACK πŸ™ˆ

ngl, this document, and the package it describes, will undoubtedly contain bugs and other problems. it's software, bestie, it happens 😭

please report such in the category coroutine of the Tcllib Trackers:

http://core.tcl.tk/tcllib/reportlist

please also report any ideas for enhancements you may have for either package and/or documentation. we love ideas here πŸŽ€

when proposing code changes, please provide unified diffs, i.e the output of diff -u. that's the love language of maintainers fr fr.

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. the way that's so specific... but it's the move 🫢


πŸ’œ KEYWORDS πŸ’œ

after, channel, coroutine, events, exit, gets, global, green threads, read, threads, update, vwait

iykyk πŸ’…


πŸ‘‘ CATEGORY πŸ‘‘

Coroutine


Copyright (c) 2010-2014 Andreas Kupries <andreas_kupries@users.sourceforge.net>

and that's the whole page, bestie!! this one came out of <b>tcllib</b> version <b>1.3</b>, dated <b>coroutine::auto(3tcl)</b> β€” so go intercept some builtins, stay coroutine-oblivious, and remember: no commands, no problem. slay πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from