mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Properly close the renderqueue when shutting down
This commit is contained in:
@@ -7,6 +7,8 @@ from collections import deque
|
||||
|
||||
from PyQt6.QtCore import QObject, pyqtSignal
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
|
||||
from .render_queue import RenderQueue
|
||||
from .ui.main_window import MainWindow
|
||||
|
||||
from src.api.api_server import start_server
|
||||
@@ -45,7 +47,10 @@ def run() -> int:
|
||||
window: MainWindow = MainWindow()
|
||||
window.buffer_handler = buffer_handler
|
||||
window.show()
|
||||
return sys.exit(app.exec())
|
||||
|
||||
return_code = app.exec()
|
||||
RenderQueue.prepare_for_shutdown()
|
||||
return sys.exit(return_code)
|
||||
|
||||
|
||||
class BufferingHandler(logging.Handler, QObject):
|
||||
|
||||
Reference in New Issue
Block a user