
IO::Async::Future - use Future with IO::Async

use IO::Async::Loop;
my $loop = IO::Async::Loop->new;
my $future = $loop->new_future;
$loop->watch_time( after => 3, code => sub { $future->done( "Done" ) } );
print $future->get, "\n";

This subclass of Future stores a reference to the IO::Async::Loop instance that created it, allowing the await method to block until the Future is ready. These objects should not be constructed directly; instead the new_future method on the containing Loop should be used.
For a full description on how to use Futures, see the Future documentation.

New IO::Async::Future objects should be constructed by using the following methods on the Loop. For more detail see the IO::Async::Loop documentation.
Returns a new pending Future.
Returns a new Future that will become done at a given time.
Returns a new Future that will become failed at a given time.

Returns the underlying IO::Async::Loop object.

Paul Evans <leonerd@leonerd.org.uk>