Message300556
When using https://github.com/python/cpython/pull/3138 I see that test_pydoc leaves a dangling thread. The bug comes from test_server() which uses pydoc ServerThread.
ServerThread.stop() and test_pydoc don't join the thread. Moreover, ServerThread.docserver has a reference cycle through the DocServer.callback attribute.
Attached PR modifies ServerThread.stop() to join itself (the thread), to wait until the HTTP server completes, and then explicitly break the reference cycle.
With the PR, pydoc may hang if a bad HTTP client. So another option is to only modify test_pydoc to join() + break the ref cycle. |
|
Date |
User |
Action |
Args |
2017-08-18 23:50:45 | vstinner | set | recipients:
+ vstinner |
2017-08-18 23:50:45 | vstinner | set | messageid: <1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> |
2017-08-18 23:50:45 | vstinner | link | issue31238 messages |
2017-08-18 23:50:45 | vstinner | create | |
|