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.26 by root, Sun Aug 7 03:34:07 2005 UTC vs.
Revision 1.27 by root, Tue Aug 16 22:22:18 2005 UTC

66 66
67BEGIN { 67BEGIN {
68 $VERSION = 1.1; 68 $VERSION = 1.1;
69 69
70 @EXPORT = qw(aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink 70 @EXPORT = qw(aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink
71 aio_fsync aio_fdatasync aio_readahead); 71 aio_rmdir aio_symlink aio_fsync aio_fdatasync aio_readahead);
72 @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs); 72 @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs);
73 73
74 require XSLoader; 74 require XSLoader;
75 XSLoader::load IO::AIO, $VERSION; 75 XSLoader::load IO::AIO, $VERSION;
76} 76}
191=item aio_unlink $pathname, $callback 191=item aio_unlink $pathname, $callback
192 192
193Asynchronously unlink (delete) a file and call the callback with the 193Asynchronously unlink (delete) a file and call the callback with the
194result code. 194result code.
195 195
196=item aio_rmdir $pathname, $callback
197
198Asynchronously rmdir (delete) a directory and call the callback with the
199result code.
200
196=item aio_fsync $fh, $callback 201=item aio_fsync $fh, $callback
197 202
198Asynchronously call fsync on the given filehandle and call the callback 203Asynchronously call fsync on the given filehandle and call the callback
199with the fsync result code. 204with the fsync result code.
200 205
318 323
319 # try to generate nice filehandles 324 # try to generate nice filehandles
320 my $sym = "IO::AIO::fd#$_[0]"; 325 my $sym = "IO::AIO::fd#$_[0]";
321 local *$sym; 326 local *$sym;
322 327
323 open *$sym, "+<&$_[0]" # usually under any unix 328 open *$sym, "+<&=$_[0]" # usually works under any unix
324 or open *$sym, "<&$_[0]" # cygwin needs this 329 or open *$sym, "<&=$_[0]" # cygwin needs this
325 or open *$sym, ">&$_[0]" # cygwin needs this 330 or open *$sym, ">&=$_[0]" # or this
326 or return undef; 331 or return undef;
327 332
328 *$sym 333 *$sym
329} 334}
330 335
334 max_parallel 0; 339 max_parallel 0;
335} 340}
336 341
3371; 3421;
338 343
344=head2 FORK BEHAVIOUR
345
346IO::AIO handles all outstanding AIO requests before the fork, destroys all
347AIO threads, and recreates them in both the parent and the child after the
348fork.
349
350
339=head1 SEE ALSO 351=head1 SEE ALSO
340 352
341L<Coro>, L<Linux::AIO>. 353L<Coro>, L<Linux::AIO>.
342 354
343=head1 AUTHOR 355=head1 AUTHOR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines