    def is_task_runnable(self, task:Task):
        """Inspect whether the task should be run."""
        #! TODO: Can this be put to the Task?
        execution = task.get_execution()
        if execution == "process":
            has_free_processors = self.has_free_processors()
            if not has_free_processors:
                return False
        if execution in ("thread", "async", "process"):
            if task.multilaunch is None:
                allow_multilaunch = self.session.config.multilaunch
            else:
                allow_multilaunch = task.multilaunch
            if not allow_multilaunch and task.is_alive():
                return False
        is_condition = self.check_task_cond(task)
        return is_condition
Inspect whether the task should be run.
rocketry/core/schedule.py