SPVM::Thread::ID(3)

πŸ“¦ version 0.005, in alpine 3.24

πŸ’– Name πŸ’–

SPVM::Thread::ID β€” Thread ID. That’s literally the name, bestie, and it’s giving β€œsmall class, big main-character energy.” This page is from the User Contributed Perl Documentation, and it’s all about comparing thread IDs. 🫢


✨ Usage ✨

use Thread::ID;

my $result = Thread::ID->eq($thread_id1, $thread_id2);

That’s the little starter pack right there. No cap. πŸŽ€


🌸 Description 🌸

The Thread::ID class in SPVM has methods to compare thread IDs. It’s literally the comparison HQ for thread IDs. πŸ’…

This class is a binding of std::thread::id in C++ β€” the C++ reference link is right here: https://en.cppreference.com/w/cpp/thread/thread/id. Iconic crossover behavior, honestly. πŸ¦‹


πŸ‘‘ Class Methods πŸ‘‘

Every method here is a static method, and every one returns an int. The pattern is simple and honestly kind of slay: do the check, get 1 if it’s ok, get 0 if it’s not. ⭐

eq

static method eq : int ($thread_id1 : Thread::ID, $thread_id2 : Thread::ID);

Checks if the thread ID $thread_id1 is equal to the thread ID $thread_id2.

If the check is ok, returns 1, otherwise returns 0. Equality check bestie, periodt. πŸ’–

ne

static method ne : int ($thread_id1 : Thread::ID, $thread_id2 : Thread::ID);

Checks if the thread ID $thread_id1 is not equal to the thread ID $thread_id2.

If the check is ok, returns 1, otherwise returns 0. The β€œnot equal” vibe check, lowkey essential. ✨

gt

static method gt : int ($thread_id1 : Thread::ID, $thread_id2 : Thread::ID);

Checks if the thread ID $thread_id1 is greater than the thread ID $thread_id2.

If the check is ok, returns 1, otherwise returns 0. It’s giving greater-than realness. πŸ”₯

ge

static method ge : int ($thread_id1 : Thread::ID, $thread_id2 : Thread::ID);

Checks if the thread ID $thread_id1 is greater than or equal to the thread ID $thread_id2.

If the check is ok, returns 1, otherwise returns 0. Greater-than-or-equal, but make it cute. 🌈

lt

static method lt : int ($thread_id1 : Thread::ID, $thread_id2 : Thread::ID);

Checks if the thread ID $thread_id1 is less than the thread ID $thread_id2.

If the check is ok, returns 1, otherwise returns 0. Less-than said hello. πŸ‘‹

le

static method le : int ($thread_id1 : Thread::ID, $thread_id2 : Thread::ID);

Checks if the thread ID $thread_id1 is less than or equal to the thread ID $thread_id2.

If the check is ok, returns 1, otherwise returns 0. Less-than-or-equal, fully understood, no notes. πŸ’œ

See Also


Copyright 2022-2022 Yuki Kimoto, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


mwah πŸ’‹ this page was served with perl v5.42.2, dated 2026-02-03, and it’s giving official documentation with a side of sparkle. 🫢✨

πŸ“¦ where this page comes from