Merge pull request #7 from florczakraf/use_is_alive
Use is_alive in favor of isAlive
This commit is contained in:
commit
caffd41f95
@ -38,7 +38,7 @@ class StoppableThread(threading.Thread):
|
||||
'''
|
||||
_stopThread - @see StoppableThread.stop
|
||||
'''
|
||||
if self.isAlive() is False:
|
||||
if self.is_alive() is False:
|
||||
return True
|
||||
|
||||
self._stderr = open(os.devnull, 'w')
|
||||
@ -120,7 +120,7 @@ class JoinThread(threading.Thread):
|
||||
# If py2, call this first to start thread termination cleanly.
|
||||
# Python3 does not need such ( nor does it provide.. )
|
||||
self.otherThread._Thread__stop()
|
||||
while self.otherThread.isAlive():
|
||||
while self.otherThread.is_alive():
|
||||
# We loop raising exception incase it's caught hopefully this breaks us far out.
|
||||
ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(self.otherThread.ident), ctypes.py_object(self.exception))
|
||||
self.otherThread.join(self.repeatEvery)
|
||||
|
||||
@ -86,7 +86,7 @@ def func_timeout(timeout, func, args=(), kwargs=None):
|
||||
thread.join(timeout)
|
||||
|
||||
stopException = None
|
||||
if thread.isAlive():
|
||||
if thread.is_alive():
|
||||
isStopped = True
|
||||
|
||||
class FunctionTimedOutTempType(FunctionTimedOut):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user