Message300556
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2017年08月18日.23:50:45 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|