]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-75898: make use of thread more explicit in the "Socket Programming HOWTO" document...
authorJan Kaliszewski <zuo@kaliszewski.net>
Tue, 8 Oct 2024 12:13:37 +0000 (14:13 +0200)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2024 12:13:37 +0000 (17:43 +0530)
Doc/howto/sockets.rst

index 0bbf97da39768d085a1d7d7e242d767e271345ac..cbc49d15a0771b968d0866ee38371a827bc7accf 100644 (file)
@@ -100,8 +100,8 @@ mainloop of the web server::
        (clientsocket, address) = serversocket.accept()
        # now do something with the clientsocket
        # in this case, we'll pretend this is a threaded server
-       ct = client_thread(clientsocket)
-       ct.run()
+       ct = make_client_thread(clientsocket)
+       ct.start()
 
 There's actually 3 general ways in which this loop could work - dispatching a
 thread to handle ``clientsocket``, create a new process to handle