def notifyClosed(self) -> None:
        """Used to notify the dialog so the lock can be released."""

        self._result = {} # The result should be cleared before hide, because after it is released the main thread lock
        self._visible = False
        try:
            self._lock.release()
        except:
            pass