bpo-29842: Make Executor.map less eager so it handles large/unbounded… #18566
+62
−11
Conversation
… input iterables appropriately
…lds no reference to result at the moment it yields Reduce line lengths to PEP8 limits
Hi there! sorry for intruding. I was looking for this feature and decided to try this patch out. Works great! Just found a small issue so I sent you a comment. |
except StopIteration: | ||
argsiter = None | ||
else: | ||
fs.append(self.submit(fn, *args)) |
rdarder
Mar 22, 2021
If the executor has been shut down, this will raise:
cannot schedule new futures after shutdown
But, also the base executor holds no state, so at this level it'll be pretty hard to tell if the executor has been shut down or not.
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.
… input iterables appropriately
bugs.python.org/issue29842
bugs.python.org/issue29842
recreate of #707 with conflicts fixed and versionchanged updated to py3.9
/cc @MojoVampire
https://bugs.python.org/issue29842