deleg_method(n)

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

πŸ’– deleg_method(n) β€” the Interpreter utilities glow-up πŸ’–

okay bestie, so this one lives in the Interpreter utilities corner of the manual-verse, and it's literally called deleg_method. It's a .n page, so you know it's Tcl business. Let's get into it 🫢


✨ NAME ✨

deleg_method β€” creation of comm delegates (snit methods) πŸ’…


✨ SYNOPSIS ✨

package require Tcl 8.5 9

package require snit ?1.1?

package require interp::delegate::method ?0.3?

::interp::delegate::method ?-async? name arguments comm id

✨ DESCRIPTION ✨

So this package is giving one single command, and that command is made to be used inside a snit type definition β€” which, lowkey, is actually a snit::macro, iykyk. What's it for? Conveniently creating methods that delegate the actual work over to a remote location through a "channel" that the comm package made. Remote work? We don't do it ourselves. We outsource. Main character energy πŸ’…βœ¨


✨ API ✨

🌈 ::interp::delegate::method ?-async? name arguments comm id

This command creates a method, and that method's name is whatever you put in name. Every single time somebody invokes this method, it delegates the actual work to the remote location β€” the one identified by the comm channel comm plus the endpoint id. No cap, that's the whole vibe πŸ¦‹

The name of the remote method that gets invoked by the delegator? Identical to the name of the method itself. Same name, fr fr. πŸ’–

Normally, the generated method marshalls the arguments and returns the result from the remote method as its own result. Iconic, we love a relay. But β€” and this is the plot twist 😭 β€” if the -async option was specified, then the generated method will not wait for a result and will return immediately. It said "I'm not waiting around" and honestly? periodt. πŸ‘‘


✨ BUGS, IDEAS, FEEDBACK ✨

Okay so real talk: this document, and the package it describes, will undoubtedly contain bugs and other problems. Like, obviously. πŸ™ˆ Please report such in the category interp of the Tcllib Trackers at:

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

Also please report any ideas for enhancements you may have for either the package and/or the documentation. We're listening, bestie 🫢

When proposing code changes, please provide unified diffs, i.e. the output of diff -u. That's the format. Not vibes. Diffs. πŸ’…

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, the left-most one. Go get it. πŸŽ€)

✨ KEYWORDS ✨

comm, delegation, interpreter, method, snit 🌸


✨ CATEGORY ✨

Programming tools 🧚


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


and that's the whole page, bestie!! this lil delegation manual is from tcllib, version 0.3, and yeah β€” the footer says deleg_method(n) with tcllib and 0.3 chillin' at the bottom, so that's the sign-off. go delegate something. slay πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from