pub(super) fn task_barrier(&self) -> Arc<Barrier> {
        let barrier_size = self
            .tasks
            .iter()
            .filter(|t| {
                matches!(
                    t.kind(),
                    TaskKind::Precondition | TaskKind::OneshotTask | TaskKind::Task
                )
            })
            .count();
        Arc::new(Barrier::new(barrier_size))
    }
Prepares a barrier that should be shared between tasks and preconditions.
The barrier is configured to wait for all the participants to be ready.
Barrier does not assume the existence of unconstrained tasks.
core/lib/node_framework/src/service/runnables.rs