pub(super) async fn run_internal(
        self: Box<Self>,
        stop_receiver: StopReceiver,
        preconditions_barrier: Arc<Barrier>,
    ) -> anyhow::Result<()> {
        match self.kind() {
            TaskKind::Task | TaskKind::OneshotTask => {
                self.run_with_barrier(stop_receiver, preconditions_barrier)
                    .await
            }
            TaskKind::UnconstrainedTask | TaskKind::UnconstrainedOneshotTask => {
                self.run(stop_receiver).await
            }
            TaskKind::Precondition => {
                self.check_precondition(stop_receiver, preconditions_barrier)
                    .await
            }
        }
    }
An internal helper method that guards running the task with a tokio Barrier.
Used to make sure that the task is not started until all the preconditions are met.
core/lib/node_framework/src/task/mod.rs