IO::Lam...:Select(3)
β¨ NAME β¨
okay so bestie, welcome to the IO::Lambda::Loop::Select(3) page β itβs from the User Contributed Perl Documentation crew, and the name is literally IO::Lambda::Loop::Select β the select(2)-based event loop for IO::Lambda. π
π DESCRIPTION π
This is the default implementation of the event loop for IO::Lambda. Like, the main-character default. π
IO::Lambda is designed to be agnostic of event loop choice, but this one is the default, reference implementation. No cap.
The module is not intended for direct use. π The documentation declares the event loop interface rather than explains specificities of the module.
π SYNOPSIS π
use IO::Lambda::Loop::Select; # explicitly select the event loop module
use IO::Lambda;
π API π
π new
Creates a new instance of IO::Lambda::Loop::Select. fresh out the box, literally.
π¦ after $RECORD
Stores the timeout record. The timeout record is an array, with the following layout:
[ $OBJECT, $DEADLINE, $CALLBACK ]
The loop invokes the io_handler method on $OBJECT after $DEADLINE is expired. β°
πΈ empty
Returns TRUE if there are no records in the loop, FALSE otherwise.
π remove $OBJECT
Removes all records associated with $OBJECT.
π remove_event $RECORD
Removes a single event record.
β¨ watch $RECORD
Stores the IO record. The IO record is an array, with the following layout:
[ $OBJECT, $DEADLINE, $CALLBACK, $HANDLE, $FLAGS ]
The loop invokes the io_handler method on $OBJECT either when $HANDLE becomes readable/writable etc, depending on $FLAGS, or after $DEADLINE is expired. $DEADLINE can be undef, meaning no timeout. $FLAGS is a combination of IO_READ, IO_WRITE, and IO_EXCEPTION values. π
π§ yield
Waits for at least one of the stored records to become active, dispatches events to the io_handler method for the records that are active, then removes these records. The invoker must resubmit new records in order continue receiving new events. π
mwah π β this page is from perl v5.42.2, dated 2026-02-15. slay. π
π¦ where this page comes from
- alpine 3.24: perl-io-lambda-doc 1.34-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms