| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Good work Logan! I didn't expect the documentation to be already written. I gave one minor note, and I'll wait for someone who's experienced with this module to add a review. This is probably one of the most complex modules in the standard library, and there are many pitfalls to avoid.
Sorry, something went wrong.
|
@cool-RR thanks! I've never made a contribution like this so I wasn't sure if I should write docs or not. And yeah, I was a bit worried about modifying this code because I know it's quite complex. I got all the tests to pass which I figured was a good start, but I'm a bit worried because it seems like worker processes were only originally designed to exit once a shutdown was initiated. I'm exited for a review :) |
Sorry, something went wrong.
|
I noticed the docs CI is failing, but the error message does not make any sense to me. |
Sorry, something went wrong.
|
@loganasherjones |
Sorry, something went wrong.
|
@pitrou do you have time to look at Logan's PR? |
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you for posting this PR. Here are some comments.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
There was a problem hiding this comment.
Why not assert that there weren't multiple PIDs up to this point?
Sorry, something went wrong.
There was a problem hiding this comment.
I can change around the order here and assert it on the 2nd result, but not the third.
Sorry, something went wrong.
There was a problem hiding this comment.
That's good. But why isn't the third run guaranteed to have the same PID?
Sorry, something went wrong.
There was a problem hiding this comment.
The problem is it's a race condition.
If I submit the third job, I have to check executor._processes before that worker gets the work item, finishes it and shuts down.
It could either result in an error doing self.assertEqual(len(exectuor._processes), 1) because the worker has already shut down. Even if that doesn't fail, there's no guarantee that the process hasn't already been replaced.
I could get around this by calling sleep_and_print but then it's just introducing a timing-dependent test and I figured we wouldn't want to do that.
Sorry, something went wrong.
There was a problem hiding this comment.
That makes sense. Thank you.
Sorry, something went wrong.
|
@cool-RR think this is ready for me to ping the core devs again? (assuming these tests pass) |
Sorry, something went wrong.
|
Yes, please do. |
Sorry, something went wrong.
|
I have made the requested changes; please review again. |
Sorry, something went wrong.
|
Thanks for making the requested changes! @pitrou: please review the changes made to this pull request. |
Sorry, something went wrong.
|
I have made the requested changes; please review again. |
Sorry, something went wrong.
|
Thanks for making the requested changes! @pitrou: please review the changes made to this pull request. |
Sorry, something went wrong.
|
I have made the requested changes; please review again. Hi @pitrou so this last set of changes I think is probably the best we've come up with. Let me know what you think! |
Sorry, something went wrong.
|
Thanks for making the requested changes! @pitrou: please review the changes made to this pull request. |
Sorry, something went wrong.
* Add test for number of worker processes
There was a problem hiding this comment.
Thanks @loganasherjones ! I pushed some small updates and merged upstream changes.
Sorry, something went wrong.
|
Woohoo! |
Sorry, something went wrong.
|
Ok, CI is green enough, I'll merge. |
Sorry, something went wrong.
…7373) Co-authored-by: Antoine Pitrou <antoine@python.org>
…thonGH-27373)" This reverts commit fdc0e09. This implementation relies on a mechanism for spawning new children dynamically rather than up front that leads to deadlocks due to mixing of threads+fork. See bpo-46464.
…thonGH-27373)" This reverts commit fdc0e09. This implementation relies on a mechanism for spawning new children dynamically rather than up front that leads to deadlocks due to mixing of threads+fork. See bpo-46464.
| Back | FazBrowse Home | New Git URL |
https://bugs.python.org/issue44733