thread...e::tid(3pm)

πŸ“¦
version 0.034 Β· 2 versions
, in fedora 43

πŸ’– 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 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