Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

feat(utils/thread_checker): util class to check the thread leakage for closeEvent in qt

wyzula_j requested to merge feat/thread_check into main

Description

Simple thread checker utility class which could be use for troubleshooting thread leakage for example in qt .closeEvent like this:


    def closeEvent(self, event):
        self.bec_dispatcher.disconnect_all()
        if not hasattr(self, "thread_tracker"):
            self.thread_tracker = ThreadTracker(exclude_names=["loguru"])
        try:
            self.thread_tracker.check_unfinished_threads()
            print("Active threads at application close:")
            list_active_threads()
        except Exception as e:
            print(e)
        finally:
            event.accept()

Related Issues

None

Type of Change

  • New util class thread_checker

Potential side effects

None, it is not use in any production code.

Merge request reports

Loading