Skip to content

Commit db8189b

Browse files
authored
bpo-31233, bpo-31151: Document socketserver changes (#5417)
socketserver.ForkingMixIn.server_close() and socketserver.ThreadingMixIn.server_close() now waits until all child processes and non-daemonic threads complete.
1 parent 2914bb3 commit db8189b

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

‎Doc/library/socketserver.rst‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,21 @@ server classes.
115115
:class:`ForkingMixIn` and the Forking classes mentioned below are
116116
only available on POSIX platforms that support :func:`~os.fork`.
117117

118+
:meth:`socketserver.ForkingMixIn.server_close` waits until all child
119+
processes complete.
120+
121+
:meth:`socketserver.ThreadingMixIn.server_close` waits until all non-daemon
122+
threads complete. Use daemonic threads by setting
123+
:data:`ThreadingMixIn.daemon_threads` to ``True`` to not wait until threads
124+
complete.
125+
126+
.. versionchanged:: 3.7
127+
128+
:meth:`socketserver.ForkingMixIn.server_close` and
129+
:meth:`socketserver.ThreadingMixIn.server_close` now waits until all
130+
child processes and non-daemonic threads complete.
131+
132+
118133
.. class:: ForkingTCPServer
119134
ForkingUDPServer
120135
ThreadingTCPServer

‎Doc/whatsnew/3.7.rst‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,14 @@ Changes in Python behavior
10211021
Changes in the Python API
10221022
-------------------------
10231023

1024+
* :meth:`socketserver.ThreadingMixIn.server_close` now waits until all
1025+
non-daemon threads complete. Use daemonic threads by setting
1026+
:data:`ThreadingMixIn.daemon_threads` to ``True`` to not wait until threads
1027+
complete. (Contributed by Victor Stinner in :issue:`31233`.)
1028+
1029+
* :meth:`socketserver.ForkingMixIn.server_close` now waits until all
1030+
child processes complete. (Contributed by Victor Stinner in :issue:`31151`.)
1031+
10241032
* The :func:`locale.localeconv` function now sets temporarily the ``LC_CTYPE``
10251033
locale to the ``LC_NUMERIC`` locale in some cases.
10261034

0 commit comments

Comments
 (0)