Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new block_on_close class attribute to ForkingMixIn and ThreadingMixIn classes of socketserver.
|
I rebased my PR. |
|
|
||
| :meth:`socketserver.ThreadingMixIn.server_close` waits until all non-daemon | ||
| threads complete. Use daemonic threads by setting | ||
| threads complete, except if | ||
| :attr:`socketserver.ThreadingMixIn.block_on_close` attribute if false. Use |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
should be "attribute is false"
| @@ -129,6 +132,9 @@ server classes. | |||
| :meth:`socketserver.ThreadingMixIn.server_close` now waits until all | |||
| child processes and non-daemonic threads complete. | |||
|
|
|||
| Add a new :attr:`socketserver.ForkingMixIn.block_on_close` class | |||
| attribute to opt-in for the old behaviour. | |||
|
|
|||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It might read better it the addition were not a separate paragraph. How about removing the blank line and rewording a bit, perhaps:
If necessary, set the new :attr:socketserver.ForkingMixIn.block_on_close class
attribute to False to obtain the pre-3.7 behavior.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Your proposed sentence doesn't explicitly say that the attribute is new in 3.7. I removed the empty line.
|
|
||
| Add a new :attr:`socketserver.ForkingMixIn.block_on_close` class attribute to | ||
| :class:`socketserver.ForkingMixIn` and :class:`socketserver.ThreadingMixIn` | ||
| classes. Set the class attribute to ``False`` to get the old behaviour. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
old -> pre-3.7
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
| * :meth:`socketserver.ThreadingMixIn.server_close` now waits until all | ||
| non-daemon threads complete. Set the new | ||
| :attr:`socketserver.ThreadingMixIn.block_on_close` class attribute to | ||
| ``False`` to get the old behaviour. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
pre-3.7
| * :meth:`socketserver.ForkingMixIn.server_close` now waits until all | ||
| child processes complete. Set the new | ||
| :attr:`socketserver.ForkingMixIn.block_on_close` class attribute to ``False`` | ||
| to get the old behaviour. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
pre-3.7
|
When you're done making the requested changes, leave the comment: |
* old => pre-3.7 * remove an empty line
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @ned-deily: please review the changes made to this pull request. |
|
Thanks @vstinner for the PR |
|
Thanks @vstinner for the PR |
|
Sorry, @vstinner, I could not cleanly backport this to |
Add a new block_on_close class attribute to ForkingMixIn and ThreadingMixIn classes of socketserver to opt-in for pre-3.7 behaviour. (cherry picked from commit 453bd0b) Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
GH-7088 is a backport of this pull request to the 3.7 branch. |
Add a new block_on_close class attribute to ForkingMixIn and ThreadingMixIn classes of socketserver to opt-in for pre-3.7 behaviour.
Add a new block_on_close class attribute to ForkingMixIn and
ThreadingMixIn classes of socketserver.
https://bugs.python.org/issue33540