def waitForThreads():
util.DEBUG_LOG('Checking for any remaining threads')
while len(threading.enumerate()) > 1:
for t in threading.enumerate():
if t != threading.currentThread():
if t.isAlive():
util.DEBUG_LOG('Waiting on: {0}...'.format(t.name))
if isinstance(t, threading._Timer):
t.cancel()
t.join()
elif isinstance(t, threadutils.KillableThread):
t.kill(force_and_wait=True)
else:
t.join()
评论列表
文章目录