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

Comparing IO-AIO/README (file contents):
Revision 1.57 by root, Mon Jan 18 11:53:09 2016 UTC vs.
Revision 1.58 by root, Sun May 1 17:19:39 2016 UTC

184 aio_scandir $pathname, $maxreq, $callback->($dirs, $nondirs) 184 aio_scandir $pathname, $maxreq, $callback->($dirs, $nondirs)
185 aio_load $pathname, $data, $callback->($status) 185 aio_load $pathname, $data, $callback->($status)
186 aio_copy $srcpath, $dstpath, $callback->($status) 186 aio_copy $srcpath, $dstpath, $callback->($status)
187 aio_move $srcpath, $dstpath, $callback->($status) 187 aio_move $srcpath, $dstpath, $callback->($status)
188 aio_rmtree $pathname, $callback->($status) 188 aio_rmtree $pathname, $callback->($status)
189 aio_fcntl $fh, $cmd, $arg, $callback->($status)
190 aio_ioctl $fh, $request, $buf, $callback->($status)
189 aio_sync $callback->($status) 191 aio_sync $callback->($status)
190 aio_syncfs $fh, $callback->($status) 192 aio_syncfs $fh, $callback->($status)
191 aio_fsync $fh, $callback->($status) 193 aio_fsync $fh, $callback->($status)
192 aio_fdatasync $fh, $callback->($status) 194 aio_fdatasync $fh, $callback->($status)
193 aio_sync_file_range $fh, $offset, $nbytes, $flags, $callback->($status) 195 aio_sync_file_range $fh, $offset, $nbytes, $flags, $callback->($status)
888 Delete a directory tree starting (and including) $path, return the 890 Delete a directory tree starting (and including) $path, return the
889 status of the final "rmdir" only. This is a composite request that 891 status of the final "rmdir" only. This is a composite request that
890 uses "aio_scandir" to recurse into and rmdir directories, and unlink 892 uses "aio_scandir" to recurse into and rmdir directories, and unlink
891 everything else. 893 everything else.
892 894
895 aio_fcntl $fh, $cmd, $arg, $callback->($status)
896 aio_ioctl $fh, $request, $buf, $callback->($status)
897 These work just like the "fcntl" and "ioctl" built-in functions,
898 except they execute asynchronously and pass the return value to the
899 callback.
900
901 Both calls can be used for a lot of things, some of which make more
902 sense to run asynchronously in their own thread, while some others
903 make less sense. For example, calls that block waiting for external
904 events, such as locking, will also lock down an I/O thread while it
905 is waiting, which can deadlock the whole I/O system. At the same
906 time, there might be no alternative to using a thread to wait.
907
908 So in general, you should only use these calls for things that do
909 (filesystem) I/O, not for things that wait for other events
910 (network, other processes), although if you are careful and know
911 what you are doing, you still can.
912
893 aio_sync $callback->($status) 913 aio_sync $callback->($status)
894 Asynchronously call sync and call the callback when finished. 914 Asynchronously call sync and call the callback when finished.
895 915
896 aio_fsync $fh, $callback->($status) 916 aio_fsync $fh, $callback->($status)
897 Asynchronously call fsync on the given filehandle and call the 917 Asynchronously call fsync on the given filehandle and call the
1638 1658
1639 $flags can be a combination of "IO::AIO::MAP_SHARED" or 1659 $flags can be a combination of "IO::AIO::MAP_SHARED" or
1640 "IO::AIO::MAP_PRIVATE", or a number of system-specific flags (when 1660 "IO::AIO::MAP_PRIVATE", or a number of system-specific flags (when
1641 not available, the are 0): "IO::AIO::MAP_ANONYMOUS" (which is set to 1661 not available, the are 0): "IO::AIO::MAP_ANONYMOUS" (which is set to
1642 "MAP_ANON" if your system only provides this constant), 1662 "MAP_ANON" if your system only provides this constant),
1663 "IO::AIO::MAP_LOCKED", "IO::AIO::MAP_NORESERVE",
1643 "IO::AIO::MAP_HUGETLB", "IO::AIO::MAP_LOCKED", 1664 "IO::AIO::MAP_POPULATE", "IO::AIO::MAP_NONBLOCK",
1644 "IO::AIO::MAP_NORESERVE", "IO::AIO::MAP_POPULATE", 1665 "IO::AIO::MAP_FIXED", "IO::AIO::MAP_GROWSDOWN",
1645 "IO::AIO::MAP_NONBLOCK", "IO::AIO::MAP_FIXED", 1666 "IO::AIO::MAP_32BIT", "IO::AIO::MAP_HUGETLB" or
1646 "IO::AIO::MAP_GROWSDOWN", "IO::AIO::MAP_32BIT", 1667 "IO::AIO::MAP_STACK".
1647 "IO::AIO::MAP_HUGETLB" or "IO::AIO::MAP_STACK".
1648 1668
1649 If $fh is "undef", then a file descriptor of -1 is passed. 1669 If $fh is "undef", then a file descriptor of -1 is passed.
1650 1670
1651 $offset is the offset from the start of the file - it generally must 1671 $offset is the offset from the start of the file - it generally must
1652 be a multiple of "IO::AIO::PAGESIZE" and defaults to 0. 1672 be a multiple of "IO::AIO::PAGESIZE" and defaults to 0.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines