IO::Async::Future - use Future with IO::Async
IO::Async::Future
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.
await
new_future
For a full description on how to use Futures, see the Future documentation.
Paul Evans <leonerd@leonerd.org.uk>
To install IO::Async, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IO::Async
CPAN shell
perl -MCPAN -e shell install IO::Async
For more information on module installation, please visit the detailed CPAN module installation guide.