@@ -207,7 +207,7 @@ def serve_client(self, conn):
207207 Handle requests from the proxies in a particular process/thread
208208 '''
209209 util .debug ('starting server thread to service %r' ,
210- threading .current_thread ().get_name () )
210+ threading .current_thread ().name )
211211
212212 recv = conn .recv
213213 send = conn .send
@@ -257,7 +257,7 @@ def serve_client(self, conn):
257257
258258 except EOFError :
259259 util .debug ('got EOF -- exiting thread serving %r' ,
260- threading .current_thread ().get_name () )
260+ threading .current_thread ().name )
261261 sys .exit (0 )
262262
263263 except Exception :
@@ -270,7 +270,7 @@ def serve_client(self, conn):
270270 send (('#UNSERIALIZABLE' , repr (msg )))
271271 except Exception as e :
272272 util .info ('exception in thread serving %r' ,
273- threading .current_thread ().get_name () )
273+ threading .current_thread ().name )
274274 util .info (' ... message was %r' , msg )
275275 util .info (' ... exception was %r' , e )
276276 conn .close ()
@@ -392,7 +392,7 @@ def accept_connection(self, c, name):
392392 '''
393393 Spawn a new thread to serve this connection
394394 '''
395- threading .current_thread ().set_name ( name )
395+ threading .current_thread ().name = name
396396 c .send (('#RETURN' , None ))
397397 self .serve_client (c )
398398
@@ -706,8 +706,8 @@ def __init__(self, token, serializer, manager=None,
706706 def _connect (self ):
707707 util .debug ('making connection to manager' )
708708 name = current_process ().get_name ()
709- if threading .current_thread ().get_name () != 'MainThread' :
710- name += '|' + threading .current_thread ().get_name ()
709+ if threading .current_thread ().name != 'MainThread' :
710+ name += '|' + threading .current_thread ().name
711711 conn = self ._Client (self ._token .address , authkey = self ._authkey )
712712 dispatch (conn , None , 'accept_connection' , (name ,))
713713 self ._tls .connection = conn
@@ -720,7 +720,7 @@ def _callmethod(self, methodname, args=(), kwds={}):
720720 conn = self ._tls .connection
721721 except AttributeError :
722722 util .debug ('thread %r does not own a connection' ,
723- threading .current_thread ().get_name () )
723+ threading .current_thread ().name )
724724 self ._connect ()
725725 conn = self ._tls .connection
726726
@@ -781,7 +781,7 @@ def _decref(token, authkey, state, tls, idset, _Client):
781781 # the process owns no more references to objects for this manager
782782 if not idset and hasattr (tls , 'connection' ):
783783 util .debug ('thread %r has no more proxies so closing conn' ,
784- threading .current_thread ().get_name () )
784+ threading .current_thread ().name )
785785 tls .connection .close ()
786786 del tls .connection
787787
0 commit comments