NAME
Linux::Event::Loop - Selector and public front door for Linux::Event engines
SYNOPSIS
use v5.36;
use Linux::Event::Loop;
my $reactor = Linux::Event::Loop->new(
model => 'reactor',
backend => 'epoll',
);
my $proactor = Linux::Event::Loop->new(
model => 'proactor',
backend => 'uring',
);
<<<<<<< HEAD ======= my $loop = Linux::Event->new( model => 'reactor', );
>>>>>>> 1401c31 (prep for cpan and release, new tool added) =head1 DESCRIPTION
Linux::Event::Loop is the stable public front door for this distribution. It does not implement the readiness engine or the completion engine itself. Instead, it selects one of the engine classes and delegates the public API to that implementation object.
The current engines are:
<<<<<<< HEAD This split keeps the public constructor short while allowing the reactor and proactor internals to evolve independently.
======= >>>>>>> 1401c31 (prep for cpan and release, new tool added) =head1 CONSTRUCTOR
new(%args)
Recognized selector arguments:
modelEither
reactororproactor. This argument is required.backendA backend name or backend object appropriate to the selected model.
Any remaining arguments are forwarded to the selected engine constructor.
COMMON METHODS
These methods are delegated for both models when supported:
backend_nameclockis_runningrunrun_oncestop
REACTOR METHODS
When the selected model is reactor, the following methods are available through the loop facade:
timerbackendschedsignalwakerpidwatchunwatchcancelafterat
PROACTOR METHODS
When the selected model is proactor, the following methods are available through the loop facade:
readwriterecvsendacceptconnectshutdowncloseafteratlive_op_countdrain_callbacks
If a method is not supported by the selected model, the loop croaks with a clear delegation error.
MODEL-SPECIFIC BEHAVIOR
This module does not try to erase the semantic difference between readiness and completion I/O. It only gives both engines a common entry point.
For readiness semantics, see Linux::Event::Reactor. For completion semantics, see Linux::Event::Proactor.