GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-19675: Terminate processes if construction of a pool is failing. by JulienPalard · Pull Request #5614 · python/cpython Conversation
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Simply except Exception sounds ok to me.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sounds OK, it does not make sense to avoid leaking process only on known exceptions, and we're not hiding it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need the process to be alive to join it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Look ok not to test it first.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @JulienPalard. See the comments I posted.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
When you're done making the requested changes, leave the comment: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have made the requested changes; please review again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for making the requested changes! @pitrou: please review the changes made to this pull request. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you @JulienPalard. Do you think you could easily add a test? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@pitrou I'm testing it by changing rlimit, by throwing random "low" value at it until "some" forks succeed and some are failing. It's really bad for a test case, I can try to produce a stable test case, maybe not with rlimit though (will probably be random when running parallel tests?). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@pitrou Tried to write a unit test. It works but I'm not fond of playing with context this way. Does it look OK for someone? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| def is_alive(self): | ||
| return self.state == 'started' | ||
|
|
||
| try: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why not assertRaises?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The MagicMock thing looks fragile to me. Perhaps you can use a real context and temporarily swap out its |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
# Conflicts: # Lib/test/_test_multiprocessing.py
|
Wouldn't this need to be backported to 2.7 as well? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@JulienPalard maybe you could update it with the last master and submit it again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
# Conflicts: # Lib/multiprocessing/pool.py
|
@matrixise, merged again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @taleinat |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh thanks for bringing it back, forgot it þ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @JulienPalard for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @JulienPalard, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @JulienPalard, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.