diff --git a/visidata/main.py b/visidata/main.py index 3c99fbe6f..fa65e14dc 100755 --- a/visidata/main.py +++ b/visidata/main.py @@ -346,7 +346,7 @@ def main_vd(): vs = eval_vd(vdfile, *fmtargs, **fmtkwargs) vd.sync(vs.reload()) if args.batch: - visidata.VisiData.execAsync(vd, vd.outputProgressEvery, vs, seconds=0.5, sheet=BaseSheet()) #1182 + vd.outputProgressThread = visidata.VisiData.execAsync(vd, vd.outputProgressEvery, vs, seconds=0.5, sheet=BaseSheet()) #1182 if vd.replay_sync(vs): # error return 1 diff --git a/visidata/threads.py b/visidata/threads.py index 13a3b0f84..6fdc39f64 100644 --- a/visidata/threads.py +++ b/visidata/threads.py @@ -263,7 +263,7 @@ def sync(self, *joiningThreads): while True: deads = set() # dead threads threads = joiningThreads or set(self.unfinishedThreads) - threads -= set([threading.current_thread(), getattr(vd, 'drawThread', None)]) + threads -= set([threading.current_thread(), getattr(vd, 'drawThread', None), getattr(vd, 'outputProgressThread', None)]) threads -= deads threads -= set([None]) for t in threads: