feat: set exit event on SIGINT

This commit is contained in:
aclist committed 2026-05-01 22:54:20 +09:00
1 parent 90f818f462
commit 0aafe44b4e
3 files changed
+17 -4

No files matched your search

+10 -2
View File
@@ -1,7 +1,7 @@
import inspect
import logging
import threading
from typing import Any, Callable, TYPE_CHECKING
from typing import Any, TYPE_CHECKING
import dzgui.util._json as JSON # noqa
@@ -84,6 +84,8 @@ class Controller(GObject.GObject):
self.loaded = False
self.pending_jobs = 1
self.exit_event = threading.Event()
def get_emitter(self) -> Emitter:
return self.emitter
@@ -442,3 +444,9 @@ class Controller(GObject.GObject):
def get_modtreeview(self) -> "ModTreeView":
return self.mediator.modtreeview
def set_exit_event(self) -> None:
self.exit_event.set()
def get_exit_event(self) -> None:
return self.exit_event