From 2a15ef0ba3798230a33ed295a3e6c61f30a816be Mon Sep 17 00:00:00 2001 From: Julien Langlois Date: Fri, 8 Nov 2024 11:24:35 -0800 Subject: [PATCH 1/2] WIP --- python/setup_project/progress_page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/setup_project/progress_page.py b/python/setup_project/progress_page.py index 751b1ab..721812a 100644 --- a/python/setup_project/progress_page.py +++ b/python/setup_project/progress_page.py @@ -154,7 +154,7 @@ def _process_new_logged_info(self): def progress_callback(self, chapter, progress): # Since a thread could be calling this make sure we are doing GUI work on the main thread. - # On Windows and CentOS, we have stability issues related to the async main thread executor, + # On Windows and CentOS TODO is it still true? what about Rocky?, we have stability issues related to the async main thread executor, # so we're not going to rely on it here. Instead, we track the chapter and progress values # and we let the QTimer we have running find them and set them from the main thread without # the need for any direct cross-thread communication. From fd22ca9ea5b71674c502618987972900586a57e4 Mon Sep 17 00:00:00 2001 From: Carlos Villavicencio Date: Mon, 16 Dec 2024 09:55:58 -0500 Subject: [PATCH 2/2] Make logic available to all OS --- python/setup_project/progress_page.py | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/python/setup_project/progress_page.py b/python/setup_project/progress_page.py index 721812a..f037725 100644 --- a/python/setup_project/progress_page.py +++ b/python/setup_project/progress_page.py @@ -154,22 +154,10 @@ def _process_new_logged_info(self): def progress_callback(self, chapter, progress): # Since a thread could be calling this make sure we are doing GUI work on the main thread. - # On Windows and CentOS TODO is it still true? what about Rocky?, we have stability issues related to the async main thread executor, - # so we're not going to rely on it here. Instead, we track the chapter and progress values - # and we let the QTimer we have running find them and set them from the main thread without - # the need for any direct cross-thread communication. - # - # NOTE: OSX is the exception. We don't have stability issues there related to the main thread - # execution, and we get MUCH better progress-bar performance/UX when we skip using the - # QTimer approach to keeping it updated. - if sgtk.util.is_macos(): - engine = sgtk.platform.current_engine() - engine.async_execute_in_main_thread( - self.__progress_on_main_thread, chapter, progress - ) - else: - self._chapter = chapter - self._progress = progress + engine = sgtk.platform.current_engine() + engine.async_execute_in_main_thread( + self.__progress_on_main_thread, chapter, progress + ) def __progress_on_main_thread(self, chapter, progress): # update the progress display