This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: SocketServer.shutdown() does not have "timeout=None" parameter
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: giampaolo.rodola, martin.panter, r.david.murray, santoso.wijaya, socketpair
Priority: normal Keywords:

Created on 2011-07-01 09:31 by socketpair, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg139557 - (view) Author: Марк Коренберг (socketpair) * Date: 2011-07-01 09:31
Suppose i'm trying to correctly terminate thread with socketserver during application termination.

I do not want to wait too long (also do not want to hang), I want to protect against long-lived operations in SimpleServer

so something like
myserver.shutdown(2)
will be nice.

Also it should return True or False depending on successfull shutting down.

It's easy to implement - thanks to Threading.event.wait(timeout=...)

Don't know if it is applicable to python 3.x
msg139592 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-07-01 17:48
Well, it's not applicable to 2.x, since it is a feature request.  As such it could only go into 3.3.  I don't have an opinion on the merits of the suggestion.
msg255597 - (view) Author: Марк Коренберг (socketpair) * Date: 2015-11-29 21:20
Please close this bug since asyncio is much more suitable, and things like socketserver is obsolete as I think.
msg255602 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-11-29 23:21
Closing as retracted by original reporter.

(Also, I wonder how useful the timeout would be. Adding a timeout isn’t going to fix a hanging server.)
History
Date User Action Args
2022-04-11 14:57:19adminsetgithub: 56669
2015-11-29 23:21:55martin.pantersetstatus: open -> closed

nosy: + martin.panter
messages: + msg255602

resolution: rejected
stage: resolved
2015-11-29 21:20:20socketpairsetmessages: + msg255597
2011-07-01 17:52:48santoso.wijayasetnosy: + santoso.wijaya
2011-07-01 17:48:39r.david.murraysetnosy: + r.david.murray

messages: + msg139592
versions: + Python 3.3, - Python 2.6, Python 2.7
2011-07-01 12:30:31giampaolo.rodolasetnosy: + giampaolo.rodola
2011-07-01 09:31:27socketpaircreate