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.61 by root, Sun Oct 22 13:52:11 2006 UTC vs.
Revision 1.62 by root, Sun Oct 22 21:13:47 2006 UTC

603 }; 603 };
604 604
605This makes it very easy to create composite requests (see the source of 605This makes it very easy to create composite requests (see the source of
606C<aio_move> for an application) that work and feel like simple requests. 606C<aio_move> for an application) that work and feel like simple requests.
607 607
608=over 4
609
608The IO::AIO::GRP objects will be cleaned up during calls to 610=item * The IO::AIO::GRP objects will be cleaned up during calls to
609C<IO::AIO::poll_cb>, just like any other request. 611C<IO::AIO::poll_cb>, just like any other request.
610 612
611They can be canceled like any other request. Canceling will cancel not 613=item * They can be canceled like any other request. Canceling will cancel not
612only the request itself, but also all requests it contains. 614only the request itself, but also all requests it contains.
613 615
614They can also can also be added to other IO::AIO::GRP objects. 616=item * They can also can also be added to other IO::AIO::GRP objects.
615 617
616You must not add requests to a group from within the group callback (or 618=item * You must not add requests to a group from within the group callback (or
617any later time). 619any later time).
620
621=item * This does not harmonise well with C<max_outstanding>, so best do
622not combine C<aio_group> with it. Groups and feeders are recommended for
623this kind of concurrency-limiting.
624
625=back
618 626
619Their lifetime, simplified, looks like this: when they are empty, they 627Their lifetime, simplified, looks like this: when they are empty, they
620will finish very quickly. If they contain only requests that are in the 628will finish very quickly. If they contain only requests that are in the
621C<done> state, they will also finish. Otherwise they will continue to 629C<done> state, they will also finish. Otherwise they will continue to
622exist. 630exist.
784 792
785Under normal circumstances you don't need to call this function. 793Under normal circumstances you don't need to call this function.
786 794
787=item $oldnreqs = IO::AIO::max_outstanding $nreqs 795=item $oldnreqs = IO::AIO::max_outstanding $nreqs
788 796
797[DEPRECATED]
798
789Sets the maximum number of outstanding requests to C<$nreqs>. If you 799Sets the maximum number of outstanding requests to C<$nreqs>. If you
790try to queue up more than this number of requests, the caller will block until 800try to queue up more than this number of requests, the caller will block until
791some requests have been handled. 801some requests have been handled.
792 802
793The default is very large, so normally there is no practical limit. If you 803The default is very large, so normally there is no practical limit. If you
794queue up many requests in a loop it often improves speed if you set 804queue up many requests in a loop it often improves speed if you set
795this to a relatively low number, such as C<100>. 805this to a relatively low number, such as C<100>.
806
807This function does not work well together with C<aio_group>'s, and their
808feeder interface is better suited to limiting concurrency, so do not use
809this function.
796 810
797Under normal circumstances you don't need to call this function. 811Under normal circumstances you don't need to call this function.
798 812
799=back 813=back
800 814

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines