Skip to content

Commit 33aeb2c

Browse files
tui: prevent hang on shutdown
* Add a timeout on the updater shutdown to prevent any hanging operation stopping Tui from exiting.
1 parent 747e2af commit 33aeb2c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

changes.d/fix.6178.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix an issue where Tui could hang when closing.

cylc/flow/tui/app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@ def updater_subproc(filters, client_timeout):
216216
yield updater
217217
finally:
218218
updater.terminate()
219-
p.join()
219+
p.join(4) # timeout of 4 seconds
220+
if p.exitcode is None:
221+
# updater did not exit within timeout -> kill it
222+
p.terminate()
220223

221224

222225
class TuiApp:

0 commit comments

Comments
 (0)