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

yield ordered items that finish in order immediately #60

Open
vitamins opened this issue Oct 30, 2020 · 2 comments
Open

yield ordered items that finish in order immediately #60

vitamins opened this issue Oct 30, 2020 · 2 comments

Comments

@vitamins
Copy link

For reference the description of ordered from the docs:
Creates a stage that sorts its elements based on their order of creation on the source iterable(s) of the pipeline. This stage will not yield until it accumulates all of the elements from the previous stage, use this only if all elements fit in memory.
It would be nice if ordered would yield items that finish in order immediately.

@cgarciae
Copy link
Owner

I've thought about this and having it yield in a smarter way would only work well for when you only have maps (no flat_map or filter), but given map-only is pretty common it might be worth it.

@Wenzel
Copy link

Wenzel commented May 6, 2021

I'm struggling to implement the same mechnism here, so would be nice to have it in the API 👍

I will be asking on StackOverflow in the meantime.
Edit: I asked on SO:
https://stackoverflow.com/questions/67426570/ordered-iterator-with-pypeln-map-stage-results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants