NAME
DBIx::Loop::Loop::IOAsync - drive DBIx::Loop on an IO::Async event loop
SYNOPSIS
use IO::Async::Loop;
use DBIx::Loop;
use DBIx::Loop::Loop::IOAsync;
my $adapter = DBIx::Loop::Loop::IOAsync->new; # or (loop => $existing)
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 loop adapter for IO::Async. It implements the DBIx::Loop loop seam (add_reader, add_writer, remove, timer, new_future) plus await for synchronous use. See DBIx::Loop.
new_future and to_native hand back an IO::Async::Future, except on IO::Async before 0.805 running against Future 0.50 or newer: those IO::Async versions construct theirs by poking $f->{loop}, which a Future of that vintage is not, and $loop->new_future dies. There the adapter returns a plain Future instead - the same class to the caller, without its own await, which costs nothing here because awaiting is the adapter's job.
AUTHOR
LNATION <email@lnation.org>