mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 08:48:13 +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.QtCore import QObject, pyqtSignal
|
||||||
from PyQt6.QtWidgets import QApplication
|
from PyQt6.QtWidgets import QApplication
|
||||||
|
|
||||||
|
from .render_queue import RenderQueue
|
||||||
from .ui.main_window import MainWindow
|
from .ui.main_window import MainWindow
|
||||||
|
|
||||||
from src.api.api_server import start_server
|
from src.api.api_server import start_server
|
||||||
@@ -45,7 +47,10 @@ def run() -> int:
|
|||||||
window: MainWindow = MainWindow()
|
window: MainWindow = MainWindow()
|
||||||
window.buffer_handler = buffer_handler
|
window.buffer_handler = buffer_handler
|
||||||
window.show()
|
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):
|
class BufferingHandler(logging.Handler, QObject):
|
||||||
|
|||||||
Reference in New Issue
Block a user