SPVM::Thread::ID(3)
π 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
ThreadThread::ThisThreadstd::thread::id in C++βhttps://en.cppreference.com/w/cpp/thread/thread/id
π Copyright & License π
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
- alpine 3.24: spvm-thread-doc 0.005-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms