SPVM::Thread(3)

πŸ“¦ version 0.005, in alpine 3.24

πŸŽ€ NAME πŸŽ€

okay so bestie, this is the manual page for SPVM::Thread(3) from the User Contributed Perl Documentation manual, and the actual name is SPVM::Thread - Native Thread. That's the whole vibe: native threads in SPVM. πŸ’…

✨ USAGE ✨

Here's the starter pack, literally copy-paste energy:

use Thread;

my $results = [0];
my $thread = Thread->new([$results : int[]] method : void () {
  $results->[0] = 5;
});

$thread->join;

πŸ’– DESCRIPTION πŸ’–

The Thread class in SPVM has methods to create native threads. No cap. ✨

This class is a binding of std::thread in C++ β€” the reference link is https://en.cppreference.com/w/cpp/thread/thread. πŸ¦‹

πŸ‘‘ CLASS METHODS πŸ‘‘

static method new : Thread ($task : Callback);

This one creates a new native thread and runs the task $task on it. Then it creates a new Thread object and returns it. Slay. πŸ’…

πŸ¦‹ INSTANCE METHODS πŸ¦‹

🌸 join 🌸

method join : void ();

Waits for the thread to finish. That's it, that's the whole method. πŸ’œ

πŸŽ€ get_id πŸŽ€

method get_id : Thread::ID ();

Gets the thread ID. Iconic. ⭐

🌈 REPOSITORY 🌈

SPVM::Thread - Github β€” https://github.com/yuki-kimoto/SPVM-Thread. 🫢

πŸ’• SEE ALSO πŸ’•

⭐ AUTHOR ⭐

Yuki Kimoto "kimoto.yuki@gmail.com" β€” periodt. πŸ‘‘

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.


okay bestie, that's the whole manual page! footer source/version and date check: perl v5.42.2, 2026-02-03, and yes, this is SPVM::Thread(3). byeee πŸ’–βœ¨

πŸ“¦ where this page comes from