summaryrefslogtreecommitdiffstats
path: root/Doc/library/socketserver.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-06-13 06:32:25 (GMT)
committerGeorg Brandl <georg@python.org>2008-06-13 06:32:25 (GMT)
commitf992640ed39d2865920237a3454bdffb117fe6bc (patch)
tree2687db169d72a803ee9ef2411ee085532dcbe02a /Doc/library/socketserver.rst
parent7634ff5ad6d141cab8d33fcff788b65e064a8104 (diff)
downloadcpython-f992640ed39d2865920237a3454bdffb117fe6bc.zip
cpython-f992640ed39d2865920237a3454bdffb117fe6bc.tar.gz
cpython-f992640ed39d2865920237a3454bdffb117fe6bc.tar.bz2
Fix last traces of old threading API.
Diffstat (limited to 'Doc/library/socketserver.rst')
-rw-r--r--Doc/library/socketserver.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst
index b176ca3..221de2e 100644
--- a/Doc/library/socketserver.rst
+++ b/Doc/library/socketserver.rst
@@ -480,8 +480,8 @@ An example for the :class:`ThreadingMixIn` class::
def handle(self):
data = self.request.recv(1024)
- cur_thread = threading.currentThread()
- response = "%s: %s" % (cur_thread.getName(), data)
+ cur_thread = threading.current_thread()
+ response = "%s: %s" % (cur_thread.get_name(), data)
self.request.send(response)
class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
@@ -506,9 +506,9 @@ An example for the :class:`ThreadingMixIn` class::
# more thread for each request
server_thread = threading.Thread(target=server.serve_forever)
# Exit the server thread when the main thread terminates
- server_thread.setDaemon(True)
+ server_thread.set_daemon(True)
server_thread.start()
- print "Server loop running in thread:", t.getName()
+ print "Server loop running in thread:", t.get_name()
client(ip, port, "Hello World 1")
client(ip, port, "Hello World 2")