aboutsummaryrefslogtreecommitdiff
path: root/picostream/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'picostream/cli.py')
-rw-r--r--picostream/cli.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/picostream/cli.py b/picostream/cli.py
index 23922e3..2006645 100644
--- a/picostream/cli.py
+++ b/picostream/cli.py
@@ -400,10 +400,12 @@ class Streamer:
# We call shutdown() to ensure threads are joined and cleanup happens.
self.shutdown()
else:
- # Original non-GUI behavior
- self.consumer_thread.join()
- self.pico_thread.join()
- logger.success("Acquisition complete!")
+ # In GUI mode, run() returns immediately, allowing the worker's event
+ # loop to process signals. In CLI mode, we block until completion.
+ if not self.is_gui_mode:
+ self.consumer_thread.join()
+ self.pico_thread.join()
+ logger.success("Acquisition complete!")
# --- Argument Parsing ---