bpo-28053: Allow custom reducer when using multiprocessing#15058
bpo-28053: Allow custom reducer when using multiprocessing#15058pierreglaser wants to merge 32 commits into
Conversation
|
You will notice that for the def process(self, *args, **kwargs):
return self._Process(*args, reducer=self.get_reducer(), **kwargs)This comes from the fact that the cpython/Lib/multiprocessing/context.py Lines 220 to 224 in 7397cda For the process class, passing the class Process(process.BaseProcess):
_start_method = None
@staticmethod
def _Popen(process_obj):
if self._ctx is not None:
return self._ctx.get_context()._Process._Popen(process_obj)
return _default_context.get_context()._Process._Popen(process_obj)with So implementation-wise, it is easier to simply pass the But I am opened to suggestions. |
Sorry, something went wrong.
|
@pitrou what could I do to ease the review process of this PR? |
Sorry, something went wrong.
|
@pierreglaser The first necessary condition is for me to find some time... sorry :-/ |
Sorry, something went wrong.
|
@pablogsal friendly ping: I am curious to know what are your thoughts on this. |
Sorry, something went wrong.
Rebasing is, as evidenced by repeated failures like this, error prone. Besides the obvious noise, removing the spurious review requests does not unsubscribe people. If you were just trying to update your branch to your current repository/fork master (once synchronized), rebasing is also not needed. After checking out the branch, |
Sorry, something went wrong.
MaxwellDupre
left a comment
There was a problem hiding this comment.
Run multiprocessing tests:
Ran 369 tests in 215.720s
OK (skipped=35)
Ran 39 tests in 22.709s
OK
Ran 369 tests in 85.400s
OK (skipped=39)
Ran 369 tests in 99.032s
OK (skipped=32)
Look ok to me.
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
This PR is a follow up on #9959. It implements the suggestions I made here #9959 (comment).
I'm making it a new PR to get the CI working now and gather separate feedback.
contexttoProcessobjectsAbstractPicklerintoAbstractPicklerandAbstractUnpicklerhttps://bugs.python.org/issue28053