Skip to content

Parallelism

How to run independent prerequisites at the same time. Part of the guides; full syntax in the language guide.

By default a task’s dependencies run sequentially. Adding the [parallel] attribute lets its independent dependencies run concurrently, bounded by the available cores. The task itself still runs only after all its dependencies succeed.

[parallel]
checks: lint test typecheck
@echo "all checks passed"
lint:
@echo "lint"
test:
@echo "test"
typecheck:
@echo "typecheck"

lint, test, and typecheck run together; checks runs once they all finish.

See examples/parallel.

  • Order between parallel tasks is not guaranteed. Don’t rely on lint finishing before test — if there’s a real ordering need, make one depend on the other.
  • Interleaved output. Concurrent tasks’ output can interleave; use task-level logging if you need to attribute lines.
  • Shared mutable state. Parallel tasks that write the same file will race — keep them independent, or serialize them with a dependency.