[Python-checkins] bpo-33540: Fix socketserver.ThreadingMixIn if block_on_close=False (GH-7310)
Victor Stinner
webhook-mailer at python.org
Fri Jun 1 08:21:37 EDT 2018
https://github.com/python/cpython/commit/829fcd0612049b21a6d3802b3306705218255f6b
commit: 829fcd0612049b21a6d3802b3306705218255f6b
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-06-01T14:21:34+02:00
summary:
bpo-33540: Fix socketserver.ThreadingMixIn if block_on_close=False (GH-7310)
socketserver.ThreadingMixIn no longer tracks active threads if
block_on_close is false.
files:
M Lib/socketserver.py
diff --git a/Lib/socketserver.py b/Lib/socketserver.py
index 71bb9a48fa91..9dfd21bab9b6 100644
--- a/Lib/socketserver.py
+++ b/Lib/socketserver.py
@@ -655,7 +655,7 @@ def process_request(self, request, client_address):
t = threading.Thread(target = self.process_request_thread,
args = (request, client_address))
t.daemon = self.daemon_threads
- if not t.daemon:
+ if not t.daemon and self.block_on_close:
if self._threads is None:
self._threads = []
self._threads.append(t)
More information about the Python-checkins
mailing list