From 60d6f22b146a9c44f37e9f3200356da24d49b4eb Mon Sep 17 00:00:00 2001 From: anjakefala Date: Sun, 8 Oct 2023 12:49:11 -0700 Subject: [PATCH] [batch-] sync should not wait for outputProgress Thread --- visidata/main.py | 2 +- visidata/threads.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: