Skip to content

Parallel builds

dk1 adds a single global option that controls how many external build processes run at once:

  • -j JOBS, --jobs JOBS - cap the number of external processes (compilers, subcommands, function commands, subshells, and request.ui spawns) that run concurrently. JOBS must be a positive integer; -j 0 or a negative value is rejected and dk1 exits non-zero.

When -j is not given, dk1 defaults JOBS to the detected CPU count: the NUMBER_OF_PROCESSORS environment variable on Windows, and getconf _NPROCESSORS_ONLN on Unix, falling back to 1 when detection fails. Pass -j 1 to force fully serial execution (equivalent to dk0).

-j caps external processes in flight, not the size of the internal worker pool. The worker pool is sized with headroom above JOBS so that non-process work (I/O, hashing) does not starve behind the capped process jobs.