diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst index 7c8c8d52e03d95..232c0616d925dc 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() diff --git a/Misc/NEWS.d/next/Documentation/2020-03-11-15-49-35.bpo-3979.PerThq.rst b/Misc/NEWS.d/next/Documentation/2020-03-11-15-49-35.bpo-3979.PerThq.rst new file mode 100644 index 00000000000000..a563072b02f153 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2020-03-11-15-49-35.bpo-3979.PerThq.rst @@ -0,0 +1 @@ +This is a simple change to inform the user that shutdown() should be run from a different thread than serve_forever() \ No newline at end of file