summaryrefslogtreecommitdiff
path: root/examples/io-async.pl
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-03-10 19:55:44 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-03-10 19:55:44 +0000
commit8cc5160aefb2ba3611d1d5d6b12b996227f9da72 (patch)
tree256923c9d568f659ca72d254993e6a40c439a7b5 /examples/io-async.pl
downloadFuture-tarball-master.tar.gz
Diffstat (limited to 'examples/io-async.pl')
-rw-r--r--examples/io-async.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/io-async.pl b/examples/io-async.pl
new file mode 100644
index 0000000..7763db1
--- /dev/null
+++ b/examples/io-async.pl
@@ -0,0 +1,9 @@
+use IO::Async::Loop 0.56; # Already has Future support built-in ;)
+
+my $loop = IO::Async::Loop->new;
+
+my $timer = $loop->delay_future( after => 3 );
+print "Awaiting 3 seconds...\n";
+
+$timer->get;
+print "Done\n";