@@ -169,7 +169,7 @@ def serve_forever(self):
169169 except (OSError , IOError ):
170170 continue
171171 t = threading .Thread (target = self .handle_request , args = (c ,))
172- t .setDaemon (True )
172+ t .set_daemon (True )
173173 t .start ()
174174 except (KeyboardInterrupt , SystemExit ):
175175 pass
@@ -216,7 +216,7 @@ def serve_client(self, conn):
216216 Handle requests from the proxies in a particular process/thread
217217 '''
218218 util .debug ('starting server thread to service %r' ,
219- threading .currentThread ().getName ())
219+ threading .current_thread ().get_name ())
220220
221221 recv = conn .recv
222222 send = conn .send
@@ -266,7 +266,7 @@ def serve_client(self, conn):
266266
267267 except EOFError :
268268 util .debug ('got EOF -- exiting thread serving %r' ,
269- threading .currentThread ().getName ())
269+ threading .current_thread ().get_name ())
270270 sys .exit (0 )
271271
272272 except Exception :
@@ -279,7 +279,7 @@ def serve_client(self, conn):
279279 send (('#UNSERIALIZABLE' , repr (msg )))
280280 except Exception as e :
281281 util .info ('exception in thread serving %r' ,
282- threading .currentThread ().getName ())
282+ threading .current_thread ().get_name ())
283283 util .info (' ... message was %r' , msg )
284284 util .info (' ... exception was %r' , e )
285285 conn .close ()
@@ -401,7 +401,7 @@ def accept_connection(self, c, name):
401401 '''
402402 Spawn a new thread to serve this connection
403403 '''
404- threading .currentThread ().setName (name )
404+ threading .current_thread ().set_name (name )
405405 c .send (('#RETURN' , None ))
406406 self .serve_client (c )
407407
@@ -715,8 +715,8 @@ def __init__(self, token, serializer, manager=None,
715715 def _connect (self ):
716716 util .debug ('making connection to manager' )
717717 name = current_process ().get_name ()
718- if threading .currentThread ().getName () != 'MainThread' :
719- name += '|' + threading .currentThread ().getName ()
718+ if threading .current_thread ().get_name () != 'MainThread' :
719+ name += '|' + threading .current_thread ().get_name ()
720720 conn = self ._Client (self ._token .address , authkey = self ._authkey )
721721 dispatch (conn , None , 'accept_connection' , (name ,))
722722 self ._tls .connection = conn
@@ -729,7 +729,7 @@ def _callmethod(self, methodname, args=(), kwds={}):
729729 conn = self ._tls .connection
730730 except AttributeError :
731731 util .debug ('thread %r does not own a connection' ,
732- threading .currentThread ().getName ())
732+ threading .current_thread ().get_name ())
733733 self ._connect ()
734734 conn = self ._tls .connection
735735
@@ -790,7 +790,7 @@ def _decref(token, authkey, state, tls, idset, _Client):
790790 # the process owns no more references to objects for this manager
791791 if not idset and hasattr (tls , 'connection' ):
792792 util .debug ('thread %r has no more proxies so closing conn' ,
793- threading .currentThread ().getName ())
793+ threading .current_thread ().get_name ())
794794 tls .connection .close ()
795795 del tls .connection
796796
@@ -969,13 +969,13 @@ def __exit__(self, exc_type, exc_val, exc_tb):
969969
970970class ConditionProxy (AcquirerProxy ):
971971 # XXX will Condition.notfyAll() name be available in Py3.0?
972- _exposed_ = ('acquire' , 'release' , 'wait' , 'notify' , 'notifyAll ' )
972+ _exposed_ = ('acquire' , 'release' , 'wait' , 'notify' , 'notify_all ' )
973973 def wait (self , timeout = None ):
974974 return self ._callmethod ('wait' , (timeout ,))
975975 def notify (self ):
976976 return self ._callmethod ('notify' )
977977 def notify_all (self ):
978- return self ._callmethod ('notifyAll ' )
978+ return self ._callmethod ('notify_all ' )
979979
980980class EventProxy (BaseProxy ):
981981 # XXX will Event.isSet name be available in Py3.0?
0 commit comments