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.9 by root, Sun Jul 10 22:20:55 2005 UTC vs.
Revision 1.12 by root, Mon Jul 11 01:03:17 2005 UTC

27 \&IO::AIO::poll_cb; 27 \&IO::AIO::poll_cb;
28 28
29 # Tk 29 # Tk
30 Tk::Event::IO->fileevent (IO::AIO::poll_fileno, "", 30 Tk::Event::IO->fileevent (IO::AIO::poll_fileno, "",
31 readable => \&IO::AIO::poll_cb); 31 readable => \&IO::AIO::poll_cb);
32
33 # Danga::Socket
34 Danga::Socket->AddOtherFds (IO::AIO::poll_fileno =>
35 \&IO::AIO::poll_cb);
36
32 37
33=head1 DESCRIPTION 38=head1 DESCRIPTION
34 39
35This module implements asynchronous I/O using whatever means your 40This module implements asynchronous I/O using whatever means your
36operating system supports. 41operating system supports.
54use base 'Exporter'; 59use base 'Exporter';
55 60
56use Fcntl (); 61use Fcntl ();
57 62
58BEGIN { 63BEGIN {
59 $VERSION = 0.2; 64 $VERSION = 0.3;
60 65
61 @EXPORT = qw(aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink 66 @EXPORT = qw(aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink
62 aio_fsync aio_fdatasync aio_readahead); 67 aio_fsync aio_fdatasync aio_readahead);
63 @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs); 68 @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs);
64 69
228Example: wait till there are no outstanding requests anymore: 233Example: wait till there are no outstanding requests anymore:
229 234
230 IO::AIO::poll_wait, IO::AIO::poll_cb 235 IO::AIO::poll_wait, IO::AIO::poll_cb
231 while IO::AIO::nreqs; 236 while IO::AIO::nreqs;
232 237
238=item IO::AIO::flush
239
240Wait till all outstanding AIO requests have been handled.
241
233=item IO::AIO::min_parallel $nthreads 242=item IO::AIO::min_parallel $nthreads
234 243
235Set the minimum number of AIO threads to C<$nthreads>. The default is 244Set the minimum number of AIO threads to C<$nthreads>. The default is
236C<1>, which means a single asynchronous operation can be done at one time 245C<1>, which means a single asynchronous operation can be done at one time
237(the number of outstanding operations, however, is unlimited). 246(the number of outstanding operations, however, is unlimited).

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines