NAME
Linux::Event::Wakeup - eventfd-backed wakeup primitive for Linux::Event::Loop
SYNOPSIS
use v5.36;
use Linux::Event;
my $loop = Linux::Event->new;
my $waker = $loop->waker;
# from another thread or cooperating producer
$waker->signal;
# in the loop
my $count = $waker->drain;
DESCRIPTION
Linux::Event::Wakeup provides an eventfd-backed wakeup mechanism for the loop. The usual pattern is to enqueue work elsewhere, then signal the waker so the loop can wake promptly and drain that work source.
Most users obtain the waker through $loop->waker. The loop installs an internal read watcher for the eventfd so stop and explicit wakeups can break a blocking backend wait.
METHODS
fh
Return the eventfd-backed filehandle.
signal
Increment the wakeup counter.
drain
Drain pending wakeups and return the number observed.