Properly close the renderqueue when shutting down

This commit is contained in:
Brett Williams
2023-11-11 10:58:21 -06:00
parent da61bf72f8
commit 86c5d4cc15

View File

@@ -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):