fix: shutdown race if project_manager does not exit faster than tui
This commit is contained in:
parent
9eb6dd3be4
commit
3eba052c15
1 changed files with 3 additions and 3 deletions
|
@ -59,6 +59,7 @@ init_timer: ?tp.timeout,
|
||||||
sigwinch_signal: ?tp.signal = null,
|
sigwinch_signal: ?tp.signal = null,
|
||||||
no_sleep: bool = false,
|
no_sleep: bool = false,
|
||||||
mods: ModState = .{},
|
mods: ModState = .{},
|
||||||
|
final_exit: []const u8 = "normal",
|
||||||
|
|
||||||
const idle_frames = 1;
|
const idle_frames = 1;
|
||||||
|
|
||||||
|
@ -237,16 +238,15 @@ fn receive_safe(self: *Self, from: tp.pid_ref, m: tp.message) tp.result {
|
||||||
}
|
}
|
||||||
if (try m.match(.{"quit"})) {
|
if (try m.match(.{"quit"})) {
|
||||||
project_manager.shutdown();
|
project_manager.shutdown();
|
||||||
return tp.exit_normal();
|
|
||||||
}
|
}
|
||||||
if (try m.match(.{ "project_manager", "shutdown" })) {
|
if (try m.match(.{ "project_manager", "shutdown" })) {
|
||||||
return tp.exit_normal();
|
return tp.exit(self.final_exit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (try m.match(.{"restart"})) {
|
if (try m.match(.{"restart"})) {
|
||||||
_ = try self.mainview.msg(.{"write_restore_info"});
|
_ = try self.mainview.msg(.{"write_restore_info"});
|
||||||
project_manager.shutdown();
|
project_manager.shutdown();
|
||||||
return tp.exit("restart");
|
self.final_exit = "restart";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (try m.match(.{"sigwinch"})) {
|
if (try m.match(.{"sigwinch"})) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue