[Python-checkins] bpo-33540: Fix socketserver.ThreadingMixIn if block_on_close=False (GH-7309)

Victor Stinner webhook-mailer at python.org
Fri Jun 1 08:07:53 EDT 2018


https://github.com/python/cpython/commit/29ae9dc7c30b23055fdd39bec4c8f19a28392351
commit: 29ae9dc7c30b23055fdd39bec4c8f19a28392351
branch: 3.7
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-06-01T14:07:50+02:00
summary:

bpo-33540: Fix socketserver.ThreadingMixIn if block_on_close=False (GH-7309)

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