NAME
Linux::Event::Wakeup - eventfd-backed wakeup primitive for Linux::Event::Reactor
SYNOPSIS
my $waker = $loop->waker;
<<<<<<< HEAD # from another thread or cooperating producer $waker->signal; ======= my $loop = Linux::Event->new( model => 'reactor' ); >>>>>>> 1401c31 (prep for cpan and release, new tool added)
# in the loop
my $count = $waker->drain;
DESCRIPTION
Linux::Event::Wakeup provides an eventfd-backed wakeup mechanism for the reactor. 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 reactor 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.