[3.6] bpo-31238: pydoc ServerThread.stop() now joins itself (GH-3151) by vstinner · Pull Request #7324 · python/cpython
ServerThread.stop() now joins itself to wait until
DocServer.serve_until_quit() completes and then explicitly sets
its docserver attribute to None to break a reference cycle.
(cherry picked from commit 4cab2cd)