NAME
DBIx::Loop::Loop::Hyperman - drive DBIx::Loop on a Hyperman event loop, in C
SYNOPSIS
use Hyperman; # must be loaded first (runtime ABI)
use DBIx::Loop;
use DBIx::Loop::Loop::Hyperman;
my $adapter = DBIx::Loop::Loop::Hyperman->new; # or (loop => $hm_loop)
my $db = DBIx::Loop->connect($dsn, $u, $p, \%attr, loop => $adapter);
my $f = $db->query("SELECT ...");
$adapter->await($f); # run the loop until ready
my $res = ($f->get)[0];
DESCRIPTION
The pure-XS loop adapter for Hyperman. It implements the DBIx::Loop loop seam (add_reader, add_writer, remove, timer, new_future) plus await and cancel_timer, entirely in C over Hyperman's public C ABI (resolved at runtime through Hyperman::_abi_ptr - Hyperman is never a build-time dependency). It also carries an internal C vtable, so DBIx::Loop backends dispatch worker-fd readiness C-to-C with no Perl call frame on the hot path.
new_future returns a pending Hyperman::Future, the native future of the Hyperman ecosystem. await pumps the loop until the future settles and accepts both Hyperman futures and DBIx::Loop::Futures (bridged in C).
new takes an optional loop => $hyperman_loop; without one it uses the currently running Hyperman loop (inside a worker) or creates a fresh Hyperman::Loop. Loading Hyperman before constructing the adapter is required; without it new croaks.
timer($after, $cb) returns a handle; cancel_timer($handle) cancels a timer that has not fired yet. Never cancel a timer after its callback ran - the handle dies with the fire.
SEE ALSO
DBIx::Loop, DBIx::Loop::Loop::IOAsync, Hyperman
AUTHOR
LNATION <email@lnation.org>