summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorJulien Palard <julien@palard.fr>2018-03-23 16:40:33 (GMT)
committerGitHub <noreply@github.com>2018-03-23 16:40:33 (GMT)
commit8bcfa02e4b1b65634e526e197588bc600674c80b (patch)
tree78f5c33e9f31babbc38a317203be86cb7a8eb6ed /Doc
parenta0a42d22d8dff0ec6ea9daa4d9c9e9399f9b4e6c (diff)
downloadcpython-8bcfa02e4b1b65634e526e197588bc600674c80b.zip
cpython-8bcfa02e4b1b65634e526e197588bc600674c80b.tar.gz
cpython-8bcfa02e4b1b65634e526e197588bc600674c80b.tar.bz2
bpo-31639: Use threads in http.server module. (GH-5018)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/http.server.rst11
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst
index c98843de..4fe46cb 100644
--- a/Doc/library/http.server.rst
+++ b/Doc/library/http.server.rst
@@ -33,9 +33,16 @@ handler. Code to create and run the server looks like this::
:attr:`server_port`. The server is accessible by the handler, typically
through the handler's :attr:`server` instance variable.
+.. class:: ThreadedHTTPServer(server_address, RequestHandlerClass)
-The :class:`HTTPServer` must be given a *RequestHandlerClass* on instantiation,
-of which this module provides three different variants:
+ This class is identical to HTTPServer but uses threads to handle
+ requests by using the :class:`~socketserver.ThreadingMixin`. This
+ is usefull to handle web browsers pre-opening sockets, on which
+ :class:`HTTPServer` would wait indefinitly.
+
+The :class:`HTTPServer` and :class:`ThreadedHTTPServer` must be given
+a *RequestHandlerClass* on instantiation, of which this module
+provides three different variants:
.. class:: BaseHTTPRequestHandler(request, client_address, server)