def check_thread(self, thread, i=0, dir=1):
"""Check if the thread is still running."""
before = i % 8
after = (7) - before
if not after:
dir = -1
if not before:
dir = 1
i += dir
self.view.set_status(
'flow_loader',
'FlowType [%s=%s]' % (' ' * before, ' ' * after)
)
if thread.is_alive():
return sublime.set_timeout(lambda: self.check_thread(
thread, i, dir), 100)
self.view.erase_status('flow_loader')
self.handle_process(thread.returncode, thread.stdout, thread.stderr)
评论列表
文章目录