Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v23.3.x] Add forward iterator to async_for_each #16688

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #16676

async_for_each originally assumed random access iterators, but we
can also support forward iterators at the cost of some complexity.

The main limitation with forward iterators is that we cannot do
arithmetic on the iterators to determine the size of the range and
to pre-calculate end iterators. So we use counted loops instead when
those iterators are used (we dispatch to a separate path for random
access iterators).

(cherry picked from commit c667749)
@vbotbuildovich vbotbuildovich added this to the v23.3.x-next milestone Feb 23, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Feb 23, 2024
Copy link
Member

@travisdowns travisdowns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants