Name
SPVM::UV::Handle::Idle - Idle Handle for libuv
Description
UV::Handle::Idle in SPVM represents the idle handle for libuv, corresponding to the uv_idle_t structure.
Super Class
Usage
use UV::Handle::Idle;
my $idle = UV::Handle::Idle->new;
Fields
idle_cb
has idle_cb : rw UV::Callback::Idle;
The callback called when the idle handle is active.
Class Methods
new
static method new : UV::Handle::Idle ();
Creates a new UV::Handle::Idle object, and returns it.
Instance Methods
start
method start : void ($cb : UV::Callback::Idle);
Starts the idle handle with the callback $cb.
The callback $cb is stored in "idle_cb" field.
The callback $cb is invoked when the idle handle is active.
This method calls the uv_idle_start function.
Exceptions:
If $cb is not defined, an exception is thrown.
If uv_idle_start fails, an exception is thrown.
Copyright & License
Copyright (c) 2026 Yuki Kimoto
MIT License