Issue 6031: BaseServer.shutdown documentation is incomplete (original) (raw)

Created on 2009-05-15 23:57 by ggenellina, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
socketserver.rst.diff ggenellina,2009-11-15 12:05
issue6031-py3k-v2.patch sandro.tosi,2010-09-26 09:28
Messages (6)
msg87845 - (view) Author: Gabriel Genellina (ggenellina) Date: 2009-05-15 23:57
BaseServer.shutdown is documented as "Tells the serve_forever() loop to stop and waits until it does." The docstring is much more explicit: """Stops the serve_forever loop. Blocks until the loop has finished. This must be called while serve_forever() is running in another thread, or it will deadlock.""" Combined with #2302 I'd rewrite both (rst and docstring) as: BaseServer.shutdown(): Tells the serve_forever() loop to stop, and waits until the loop has finished. This must be called after serve_forever() has started and while it is running in another thread, or the shutdown() call will deadlock."
msg95286 - (view) Author: Gabriel Genellina (ggenellina) Date: 2009-11-15 12:05
Documentation patch for BaseServer.server_forever() and shutdown()
msg117407 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2010-09-26 09:28
Hello, I've refreshed this patch (correct the file name & because it applies now with an offset), other than that it seems ok: can someone review (it's quite small :) and apply it? Thanks, Sandro
msg117557 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-09-28 22:05
Hmm. It seems as though since issue 2302 is now closed, the comment about deadlocking if called before serve_forever may no longer be true. Gabriel?
msg150537 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-01-03 21:48
New changeset 4fad6b811c8b by Sandro Tosi in branch '2.7': Issue #6031: improve serve_forever() description http://hg.python.org/cpython/rev/4fad6b811c8b New changeset 4a30d36a9c69 by Sandro Tosi in branch '3.2': Issue #6031: improve serve_forever() description http://hg.python.org/cpython/rev/4a30d36a9c69
msg150538 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2012-01-03 21:50
yep indeed, I've removed the deadlock part and committed.
History
Date User Action Args
2022-04-11 14:56:48 admin set github: 50281
2012-01-03 21:50:03 sandro.tosi set status: open -> closedversions: + Python 3.3, - Python 3.1messages: + resolution: fixedstage: resolved
2012-01-03 21:48:50 python-dev set nosy: + python-devmessages: +
2010-10-29 10:07:21 admin set assignee: georg.brandl -> docs@python
2010-09-28 22:17:29 r.david.murray set versions: - Python 2.6, Python 3.0
2010-09-28 22:05:27 r.david.murray set nosy: + r.david.murraymessages: +
2010-09-26 09:28:08 sandro.tosi set files: + issue6031-py3k-v2.patchnosy: + sandro.tosimessages: +
2009-11-15 12:05:55 ggenellina set files: + socketserver.rst.diffkeywords: + patchmessages: +
2009-05-15 23:57:55 ggenellina create