Name

SPVM::Go::UV::Handle::Idle - Idle Handle for libuv

Description

Go::UV::Handle::Idle in SPVM represents the idle handle for libuv, corresponding to the uv_idle_t structure.

Super Class

Go::UV::Handle

Usage

use Go::UV::Handle::Idle;

my $idle = Go::UV::Handle::Idle->new;

Fields

idle_cb

has idle_cb : rw Go::UV::Callback::Idle;

The callback called when the idle handle is active.

Class Methods

new

static method new : Go::UV::Handle::Idle ();

Creates a new Go::UV::Handle::Idle object, and returns it.

Instance Methods

start

method start : void ($cb : Go::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