| 1 | package SPVM::Thread::ID; | ||
| 2 | |||
| 3 | 1; | ||
| 4 | |||
| 5 | =head1 Name | ||
| 6 | |||
| 7 | SPVM::Thread::ID - Thread ID | ||
| 8 | |||
| 9 | =head1 Usage | ||
| 10 | |||
| 11 | use Thread::ID; | ||
| 12 | |||
| 13 | my $result = Thread::ID->eq($thread_id1, $thread_id2); | ||
| 14 | |||
| 15 | =head1 Description | ||
| 16 | |||
| 17 | Thread::ID class in L<SPVM> has methods to compare thread IDs. | ||
| 18 | |||
| 19 | This class is a binding of L<std::thread::id in C++|https://en.cppreference.com/w/cpp/thread/thread/id>. | ||
| 20 | |||
| 21 | =head1 Class Methods | ||
| 22 | |||
| 23 | =head2 eq | ||
| 24 | |||
| 25 | C<static method eq : int ($thread_id1 : L<Thread::ID|SPVM::Thread::ID>, $thread_id2 : L<Thread::ID|SPVM::Thread::ID>);> | ||
| 26 | |||
| 27 | Checks if the thread ID $thread_id1 is equal to the thread ID $thread_id2. | ||
| 28 | |||
| 29 | If the check is ok, returns 1, otherwise returns 0. | ||
| 30 | |||
| 31 | =head2 ne | ||
| 32 | |||
| 33 | C<static method ne : int ($thread_id1 : L<Thread::ID|SPVM::Thread::ID>, $thread_id2 : L<Thread::ID|SPVM::Thread::ID>);> | ||
| 34 | |||
| 35 | Checks if the thread ID $thread_id1 is not equal to the thread ID $thread_id2. | ||
| 36 | |||
| 37 | If the check is ok, returns 1, otherwise returns 0. | ||
| 38 | |||
| 39 | =head2 gt | ||
| 40 | |||
| 41 | C<static method gt : int ($thread_id1 : L<Thread::ID|SPVM::Thread::ID>, $thread_id2 : L<Thread::ID|SPVM::Thread::ID>);> | ||
| 42 | |||
| 43 | Checks if the thread ID $thread_id1 is greater than the thread ID $thread_id2. | ||
| 44 | |||
| 45 | If the check is ok, returns 1, otherwise returns 0. | ||
| 46 | |||
| 47 | =head2 ge | ||
| 48 | |||
| 49 | C<static method ge : int ($thread_id1 : L<Thread::ID|SPVM::Thread::ID>, $thread_id2 : L<Thread::ID|SPVM::Thread::ID>);> | ||
| 50 | |||
| 51 | Checks if the thread ID $thread_id1 is greater than or equal to the thread ID $thread_id2. | ||
| 52 | |||
| 53 | If the check is ok, returns 1, otherwise returns 0. | ||
| 54 | |||
| 55 | =head2 lt | ||
| 56 | |||
| 57 | C<static method lt : int ($thread_id1 : L<Thread::ID|SPVM::Thread::ID>, $thread_id2 : L<Thread::ID|SPVM::Thread::ID>);> | ||
| 58 | |||
| 59 | Checks if the thread ID $thread_id1 is less than the thread ID $thread_id2. | ||
| 60 | |||
| 61 | If the check is ok, returns 1, otherwise returns 0. | ||
| 62 | |||
| 63 | =head2 le | ||
| 64 | |||
| 65 | C<static method le : int ($thread_id1 : L<Thread::ID|SPVM::Thread::ID>, $thread_id2 : L<Thread::ID|SPVM::Thread::ID>);> | ||
| 66 | |||
| 67 | Checks if the thread ID $thread_id1 is less than or equal to the thread ID $thread_id2. | ||
| 68 | |||
| 69 | If the check is ok, returns 1, otherwise returns 0. | ||
| 70 | |||
| 71 | =head2 See Also | ||
| 72 | |||
| 73 | =over 2 | ||
| 74 | |||
| 75 | =item * L<Thread|SPVM::Thread> | ||
| 76 | |||
| 77 | =item * L<Thread::ThisThread|SPVM::Thread::ThisThread> | ||
| 78 | |||
| 79 | =item * L<std::thread::id in C++|https://en.cppreference.com/w/cpp/thread/thread/id> | ||
| 80 | |||
| 81 | =back | ||
| 82 | |||
| 83 | =head1 Copyright & License | ||
| 84 | |||
| 85 | Copyright 2022-2022 Yuki Kimoto, all rights reserved. | ||
| 86 | |||
| 87 | This program is free software; you can redistribute it and/or modify it | ||
| 88 | under the same terms as Perl itself. | ||
| 89 |