Add par_map methods to collections - #227
Open
brendanmaguire wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
@dbrattli , do you think this is an okay approach to this? |
* `par_map` facilitates running an async function across all items in the collection * Resolves dbrattli#213
brendanmaguire
force-pushed
the
added-par-map
branch
from
August 30, 2024 15:50
49ebb17 to
5ee1df8
Compare
|
HI! Is there any updates on that? :) |
dbrattli
requested changes
Aug 15, 2026
dbrattli
left a comment
Owner
There was a problem hiding this comment.
Thanks for the async collection proposal. Before this can be reviewed, please rebase it onto current main (the branch is 27 commits behind) and address these blockers:
Map.par_mapconsumesself.to_seq()while constructing the coroutines, then consumes it again forkeys. The Map iterator is single-use, so the second pass is empty and a successful call returns an empty map. Materialize the item pairs once (or carry each key through the gathered work) and add a regression assertion that the result contains all original keys.- The tests assert a
< 0.2wall-clock duration for 0.1-second sleeps. That is scheduler/load dependent and will be flaky in CI. Test concurrent start/completion deterministically (for example, with synchronization primitives) instead of elapsed time.
Please retain ordering and error-propagation coverage across all collection variants when rebasing.
This was referenced Aug 15, 2026
Open
Contributor
Author
|
I won't have time to work on this. If someone else wants to pick it up, feel free. Or close if you'd like. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
par_mapfacilitates running an async function across all items in the collection