NAME

Linux::Event::Backend::Epoll - Built-in XS epoll backend for Linux::Event

DESCRIPTION

Linux::Event::Backend::Epoll is the built-in readiness backend used by Linux::Event::Loop. It owns the epoll file descriptor and uses private Linux::Event::XS helpers for kernel registration, reusable event storage, fd-indexed backend records, and dispatch into loop-created watchers.

This module is part of the public distribution, but its internal object layout is private. Code should interact with it through Linux::Event::Loop or the backend contract documented in Linux::Event::Backend.

CONSTRUCTOR

new(%args)

Create an epoll backend. Optional backend defaults are:

  • edge

    Register watchers in edge-triggered mode by default.

  • oneshot

    Register watchers in one-shot mode by default.

Most users should construct a loop with Linux::Event->new instead of constructing the backend directly.

METHODS

name

Returns epoll.

watch($fh, $mask, $cb, %opt)

Register $fh for the readiness mask documented in "READINESS MASKS" in Linux::Event::Backend. This method is primarily for custom loop/backend integration and preserves the generic backend callback ABI:

$cb->($loop, $fh, $fd, $mask, $tag)

watch_watcher($fh, $mask, $watcher, %opt)

Private fast path used by Linux::Event::Loop for loop-created watchers. It avoids allocating a Perl dispatch closure per watcher. This is not a stable public API.

modify($fh_or_fd, $mask, %opt)

Update an existing registration.

unwatch($fh_or_fd)

Remove an existing registration.

run_once($loop, $timeout_s = undef)

Wait for readiness once and dispatch any ready backend records.

SEE ALSO

Linux::Event, Linux::Event::Loop, Linux::Event::Backend, Linux::Event::XS