ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.pm
(Generate patch)

Comparing IO-AIO/AIO.pm (file contents):
Revision 1.274 by root, Thu Sep 21 23:43:46 2017 UTC vs.
Revision 1.275 by root, Fri Sep 22 05:20:39 2017 UTC

277 IO::AIO::idle_timeout $seconds 277 IO::AIO::idle_timeout $seconds
278 IO::AIO::max_outstanding $maxreqs 278 IO::AIO::max_outstanding $maxreqs
279 IO::AIO::nreqs 279 IO::AIO::nreqs
280 IO::AIO::nready 280 IO::AIO::nready
281 IO::AIO::npending 281 IO::AIO::npending
282 IO::AIO::min_fdlimit $nfd;
282 283
283 IO::AIO::sendfile $ofh, $ifh, $offset, $count 284 IO::AIO::sendfile $ofh, $ifh, $offset, $count
284 IO::AIO::fadvise $fh, $offset, $len, $advice 285 IO::AIO::fadvise $fh, $offset, $len, $advice
285 IO::AIO::mmap $scalar, $length, $prot, $flags[, $fh[, $offset]] 286 IO::AIO::mmap $scalar, $length, $prot, $flags[, $fh[, $offset]]
286 IO::AIO::munmap $scalar 287 IO::AIO::munmap $scalar
958 959
959Try to copy the I<file> (directories not supported as either source or 960Try to copy the I<file> (directories not supported as either source or
960destination) from C<$srcpath> to C<$dstpath> and call the callback with 961destination) from C<$srcpath> to C<$dstpath> and call the callback with
961a status of C<0> (ok) or C<-1> (error, see C<$!>). 962a status of C<0> (ok) or C<-1> (error, see C<$!>).
962 963
964Existing destination files will be truncated.
965
963This is a composite request that creates the destination file with 966This is a composite request that creates the destination file with
964mode 0200 and copies the contents of the source file into it using 967mode 0200 and copies the contents of the source file into it using
965C<aio_sendfile>, followed by restoring atime, mtime, access mode and 968C<aio_sendfile>, followed by restoring atime, mtime, access mode and
966uid/gid, in that order. 969uid/gid, in that order.
967 970
2064"Asynchronous I/O" route. Many of these have an asynchronous C<aio_*> 2067"Asynchronous I/O" route. Many of these have an asynchronous C<aio_*>
2065counterpart. 2068counterpart.
2066 2069
2067=over 4 2070=over 4
2068 2071
2072=item $numfd = IO::AIO::get_fdlimit
2073
2074Tries to find the current file descriptor limit and returns it, or
2075C<undef> and sets C<$!> in case of an error. The limit is one larger than
2076the highest valid file descriptor number.
2077
2078=item IO::AIO::min_fdlimit [$numfd]
2079
2080Try to increase the current file descriptor limit(s) to at least C<$numfd>
2081by changing the soft or hard file descriptor resource limit. If C<$numfd>
2082is missing, it will try to set a very high limit, although this is not
2083recommended when you know the actual minimum that you require.
2084
2085If the limit cannot be raised enough, the function makes a best-effort
2086attempt to increase the limit as much as possible, using various
2087tricks, while still failing. You can query the resulting limit using
2088C<IO::AIO::get_fdlimit>.
2089
2090If an error occurs, returns C<undef> and sets C<$!>.
2091
2069=item IO::AIO::sendfile $ofh, $ifh, $offset, $count 2092=item IO::AIO::sendfile $ofh, $ifh, $offset, $count
2070 2093
2071Calls the C<eio_sendfile_sync> function, which is like C<aio_sendfile>, 2094Calls the C<eio_sendfile_sync> function, which is like C<aio_sendfile>,
2072but is blocking (this makes most sense if you know the input data is 2095but is blocking (this makes most sense if you know the input data is
2073likely cached already and the output filehandle is set to non-blocking 2096likely cached already and the output filehandle is set to non-blocking

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines