NAME
Mojo::Reactor::EV - Minimalistic low level event reactor with libev support
SYNOPSIS
use Mojo::Reactor::EV;
my $reactor = Mojo::Reactor::EV->new;
DESCRIPTION
Mojo::Reactor::EV is a minimalistic low level event reactor with libev
support. Note that this module is EXPERIMENTAL and might change without warning!
EVENTS
Mojo::Reactor::EV inherits all events from Mojo::Reactor.
METHODS
Mojo::Reactor::EV inherits all methods from Mojo::Reactor and implements the following new ones.
new
my $reactor = Mojo::Reactor::EV->new;
Construct a new Mojo::Reactor::EV object.
is_running
my $success = $reactor->is_running;
Check if reactor is running.
recurring
my $id = $reactor->recurring(3 => sub {...});
Create a new recurring timer, invoking the callback repeatedly after a given amount of time in seconds.
start
$reactor->start;
Start watching for I/O and timer events, this will block until stop
is called or no events are being watched anymore.
stop
$reactor->stop;
Stop watching for I/O and timer events.
timer
my $id = $reactor->timer(3 => sub {...});
Create a new timer, invoking the callback after a given amount of time in seconds.
watch
$reactor = $reactor->watch($handle, $read, $write);
Change I/O events to watch handle for.