NAME

Linux::Event - Linux-native readiness event loop for Perl

SYNOPSIS

use v5.36;
use Linux::Event;

my $loop = Linux::Event->new;

$loop->after(0.250, sub ($loop) {
  say "timer fired";
  $loop->stop;
});

$loop->run;

DESCRIPTION

Linux::Event is the front door for a Linux-native readiness event loop. It currently ships with an epoll backend and uses Linux kernel primitives: timerfd, signalfd, eventfd, and pidfd.

This distribution intentionally stays at the loop-and-primitives layer. Higher level socket, stream, and process helpers live in companion distributions. Additional readiness backends may be added in future releases.

CONSTRUCTOR

new(%args)

Create a new loop. With no arguments, the default epoll backend is used:

my $loop = Linux::Event->new;

You may pass backend => 'epoll' explicitly or provide a custom readiness backend object:

my $loop = Linux::Event->new(backend => 'epoll');

The old model selector has been removed. Passing model is an error.

CORE MODULES

ECOSYSTEM LAYERING

Companion distributions provide higher-level building blocks:

AUTHOR

Joshua S. Day

LICENSE

Same terms as Perl itself.