https://github.com/python/cpython/commit/29723368e797f36ba8940f25b6e677852b7313b2 commit: 29723368e797f36ba8940f25b6e677852b7313b2 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: GitHub <noreply at github.com> date: 2020年03月20日T01:08:52-07:00 summary: bpo-39797 Changes to socketserver.BaseServer's shutdown() method. (GH-18929) Automerge-Triggered-By: @ned-deily (cherry picked from commit 2de7ac97981c30e9c1001b05a771f52a41772c54) Co-authored-by: amaajemyfren <32741226+amaajemyfren at users.noreply.github.com> files: M Doc/library/socketserver.rst diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst index 7c8c8d52e03d9..232c0616d925d 100644 --- a/Doc/library/socketserver.rst +++ b/Doc/library/socketserver.rst @@ -237,6 +237,8 @@ Server Objects .. method:: shutdown() Tell the :meth:`serve_forever` loop to stop and wait until it does. + :meth:`shutdown` must be called while :meth:`serve_forever` is running in a + different thread otherwise it will deadlock. .. method:: server_close()