Skip to content

Commit 4ec556a

Browse files
Merge pull request #6178 from oliver-sanders/tui-exit
tui: prevent hang on shutdown
2 parents 6d31111 + 33aeb2c commit 4ec556a

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)