coroutine::auto(n)
β¨ coroutine::auto β the manual page, but make it cute β¨
okay so this is coroutine::auto(n) β the (n) is just the Tcl manual section, bestie, it's not part of the command name π
π¦ NAME π¦
coroutine::auto β automatic event and IO coroutine awareness. that's it, that's the whole name, slay β¨
πΈ SYNOPSIS πΈ
package require Tcl 8.6 9
package require coroutine::auto 1.3
package require coroutine 1.4
π DESCRIPTION π
okay so here's the tea, and it's genuinely iconic: the coroutine::auto package gives you no commands and no other directly visible functionality. like, zero. nothing to call. it's giving invisible bestie energy π
what it does do β and this is the main character moment β is it's built on top of the package coroutine, and it intercepts various builtin commands of the Tcl core to make any code using them coroutine-oblivious, i.e. able to run inside and outside of a coroutine without changes. no rewrites, no edits, no "wait which context am I in" panic. it just works. periodt π
π the commands it's got its eye on π
these are the builtins affected by this package, fr fr:
afterexitgetsglobalputsreadsocketupdatevwait
π BUGS, IDEAS, FEEDBACK π
ngl, this document, and the package it describes, will undoubtedly contain bugs and other problems. π that's just how it is.
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 the package and/or the documentation. we love ideas. ideas are the vibe π«Ά
when proposing code changes, please provide unified diffs, i.e the output of diff -u.
also note, bestie: 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, that exact one. the left-most one. iykyk β¨
π₯ KEYWORDS π₯
after, channel, coroutine, events, exit, gets, global, green threads, read, threads, update, vwait
π CATEGORY π
Coroutine
π COPYRIGHT π
Copyright (c) 2010-2014 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole page, no cap π this was brought to you by tcllib, version 1.3 β thanks for coming to my ted talk, mwah πβ¨π
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- Copyright (c) 2010-2014 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