ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Linux-AIO/README
(Generate patch)

Comparing Linux-AIO/README (file contents):
Revision 1.5 by root, Sun Jul 10 17:11:54 2005 UTC vs.
Revision 1.7 by root, Wed Aug 17 16:57:53 2005 UTC

2 Linux::AIO - linux-specific aio implemented using clone 2 Linux::AIO - linux-specific aio implemented using clone
3 3
4SYNOPSIS 4SYNOPSIS
5 use Linux::AIO; 5 use Linux::AIO;
6 6
7 # This module has been mostly superseded by IO::AIO.
8
7DESCRIPTION 9DESCRIPTION
10 *This module has been mostly superseded by IO::AIO, which is API
11 compatible.*
12
8 This module implements asynchronous I/O using the means available to 13 This module implements asynchronous I/O using the means available to
9 Linux - clone. It does not hook into the POSIX aio_* functions because 14 Linux - clone. It does not hook into the POSIX aio_* functions because
10 Linux does not yet support these in the kernel (even as of 2.6.12, only 15 Linux does not yet support these in the kernel (even as of 2.6.12, only
11 O_DIRECT files are supported) and even if, it would only allow aio_read 16 O_DIRECT files are supported) and even if, it would only allow aio_read
12 and write, not open, stat and so on. 17 and write, not open, stat and so on.
110 115
111 Example: 116 Example:
112 117
113 aio_open "/etc/passwd", O_RDONLY, 0, sub { 118 aio_open "/etc/passwd", O_RDONLY, 0, sub {
114 if ($_[0] >= 0) { 119 if ($_[0] >= 0) {
115 open my $fh, "<&$_[0]"; # create a copy for perl 120 open my $fh, "<&=$_[0]";
116 aio_close $_[0], sub { }; # close the aio handle
117 print "open successful, fh is $fh\n"; 121 print "open successful, fh is $fh\n";
118 ... 122 ...
119 } else { 123 } else {
120 die "open failed: $!\n"; 124 die "open failed: $!\n";
121 } 125 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines