kDefaultDnsConcurrencyCap top-level constant
int
const kDefaultDnsConcurrencyCap
Default per-call ceiling on in-flight DNS resolver workers, applied process-wide by ntsQuery / ntsWarmCookies / NtsClient.query / NtsClient.warmCookies.
Sized for mobile devices: each in-flight getaddrinfo worker holds
an OS thread plus a 512 KB-1 MB pthread stack, and getaddrinfo
itself is non-cancellable, so a stalled lookup is detached and
finishes in the background. The cap bounds how many such workers
can accumulate before subsequent calls short-circuit with
NtsError.timeout (TimeoutPhase.dnsSaturation) rather than
spawning another. Raise per-call on hosts with more headroom by
passing an explicit dnsConcurrencyCap argument; values must lie
in 1..4294967295 (the FFI encoding range, validated at the
wrapper boundary).
Implementation
const int kDefaultDnsConcurrencyCap = 4;