def wait_until_something_was_done(self) -> int:
        """Block until a task is done, then return the number of unfinished
        tasks.
        """
        with self.lock:
            self.some_task_done.wait()
            return self.inner.unfinished_tasks
Block until a task is done, then return the number of unfinished
        tasks.
        
core/dbt/graph/queue.py