Skip to main content

workers_from_env

Function workers_from_env 

Source
pub fn workers_from_env() -> usize
Expand description

ZNIPPY_GIT_RESOLVE_WORKERS, else one per core. Read once per process.

The forest is the parallelism (crate::forest): a base and its dependents are a tree, and two trees share nothing, so N workers is N independent depth-first walks over one mmapped pack. It is not N copies of the pack’s O(pack) structures — the walk, the forest and the oid table are read-only and shared — and it is not N base budgets either: the held-base ceiling is one atomic across all of them (LAW 5).