… | |
… | |
1505 | |
1505 | |
1506 | Sets a feeder/generator on this group: every group can have an attached |
1506 | Sets a feeder/generator on this group: every group can have an attached |
1507 | generator that generates requests if idle. The idea behind this is that, |
1507 | generator that generates requests if idle. The idea behind this is that, |
1508 | although you could just queue as many requests as you want in a group, |
1508 | although you could just queue as many requests as you want in a group, |
1509 | this might starve other requests for a potentially long time. For example, |
1509 | this might starve other requests for a potentially long time. For example, |
1510 | C<aio_scandir> might generate hundreds of thousands C<aio_stat> requests, |
1510 | C<aio_scandir> might generate hundreds of thousands of C<aio_stat> |
1511 | delaying any later requests for a long time. |
1511 | requests, delaying any later requests for a long time. |
1512 | |
1512 | |
1513 | To avoid this, and allow incremental generation of requests, you can |
1513 | To avoid this, and allow incremental generation of requests, you can |
1514 | instead a group and set a feeder on it that generates those requests. The |
1514 | instead a group and set a feeder on it that generates those requests. The |
1515 | feed callback will be called whenever there are few enough (see C<limit>, |
1515 | feed callback will be called whenever there are few enough (see C<limit>, |
1516 | below) requests active in the group itself and is expected to queue more |
1516 | below) requests active in the group itself and is expected to queue more |