thread...e::tid(3pm)
π NAME π
threads::lite::tid β it's a thread id, bestie. That's the whole vibe. A threads::lite thread id, to be exact. It lives in the User Contributed Perl Documentation section, section 3pm, if you were wondering where to find it.
β¨ VERSION β¨
Version 0.034. That's the one. π
π¦ SYNOPSIS π¦
okay so this module is literally just a thread ID object. It's giving "handle to a thread." That's it, that's the whole thing. You hold it, you know a thread exists, you vibe. π«Ά
πΈ FUNCTIONS πΈ
π send(@list)
Send a message to a thread. Periodt.
The message items can be any data type that can be serialized by Storable β and yes bestie that includes coderefs. Not me being shocked that coderefs get to ride along. π
π id()
Get an opaque but primitive identifier for the thread. Opaque = don't peek under the hood, just accept it. Primitive = it's a plain little value you can hold onto. Iconic behavior honestly. π
π monitor()
Monitor the thread. What this does: it makes the calling thread get a notification when the thread ends. So you're not sitting there refreshing, the thread tells you when it's done. main character energy fr fr.
So here's what comes back:
- Natural death (the chill way to go) β returns
('exit', 'normal', $id, @return_value) - Unnatural death (the messy way π) β it will contain
('exit', 'error', $id, $exception)
lowkey important: those are the two shapes you get, so check which one you're dealing with before you start unpacking it.
π rpc(@args)
This is a utility function, a little helper bestie.
What it does: it sends, prepended by the sending process' tid, and then it waits for a reply, which is also prepended by the tid, and then it returns it β without the tid. So the tid is just the envelope, and you get the letter back. π
π AUTHOR π
Leon Timmermans, "<leont at cpan.org>". Give them their flowers. π
π BUGS π
ngl this is an early release. It is expected to have plenty of bugs. Not a few. Plenty. We're being honest here. π
Please report any bugs or feature requests to "bug-threads-lite at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=threads-lite>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. So like, the loop closes, you get updates, we're all connected. π«Ά
π SUPPORT π
You can find documentation for this module with the perldoc command. Slay.
perldoc threads::lite
You can also look for information at:
- RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=threads-lite>
- AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/threads-lite>
- CPAN Ratings
<http://cpanratings.perl.org/d/threads-lite>
- Search CPAN
<http://search.cpan.org/dist/threads-lite>
π COPYRIGHT & LICENSE π
Copyright 2009, 2010 Leon Timmermans, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole page bestie, ily, go monitor a thread or something πβ¨
This was pulled from perl v5.42.0, dated 2025-07-25, and yeah the page header says thread...e::tid(3pm) on both sides because the terminal is dramatic and truncates things. Byeeeee π¦π
πΈ
π¦ where this page comes from
- fedora 43: perl-threads-lite 0.034-39.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms