def join_all_jobs(self, wait_period: float = 2.0) -> None:
        """
        Wait until self.jobs is empty for at least `wait_period` seconds.

        This is because one job may add another job upon completion. We cannot simply wait until self.jobs becomes
        empty.
        """
        last_has_job = time.time()
        while time.time() - last_has_job <= wait_period:
            while self.jobs:
                QApplication.processEvents()
                last_has_job = time.time()
                time.sleep(0.05)

        Wait until self.jobs is empty for at least `wait_period` seconds.

        This is because one job may add another job upon completion. We cannot simply wait until self.jobs becomes
        empty.
        
angrmanagement/logic/jobmanager.py