pub fn cpu_budget() -> usizeExpand description
The CPU budget thread-pool sizing should derive from: host parallelism
clamped by the container’s cgroup CPU quota (#262).
available_parallelism is quota-aware on common setups, but container
runtimes exist where it still reports the host cores (docling.rs#262’s
8 threads under a 4-CPU limit), so the quota files are read directly as an
extra clamp — a limited container must never size pools past its throttle
ceiling. On non-Linux (and wasm) the quota reads simply fail and the host
count stands.