--- IO-AIO/AIO.pm 2005/07/10 21:04:24 1.5 +++ IO-AIO/AIO.pm 2005/07/10 22:19:48 1.6 @@ -6,6 +6,30 @@ use IO::AIO; + aio_open "/etc/passwd", O_RDONLY, 0, sub { + my ($fh) = @_; + ... + }; + + aio_unlink "/tmp/file", sub { }; + + aio_read $fh, 30000, 1024, $buffer, 0, sub { + $_[0] >= 0 or die "read error: $!"; + }; + + # Event + Event->io (fd => IO::AIO::poll_fileno, + poll => 'r', async => 1, + cb => \&IO::AIO::poll_cb); + + # Glib/Gtk2 + add_watch Glib::IO IO::AIO::poll_fileno, + \&IO::AIO::poll_cb; + + # Tk + Tk::Event::IO->fileevent (IO::AIO::poll_fileno, "", + readable => \&IO::AIO::poll_cb); + =head1 DESCRIPTION This module implements asynchronous I/O using whatever means your