Expand description
Global bandwidth limiting (PRD §23).
One token bucket shared by every worker, so --limit 20MiB/s means the
download totals 20 MiB/s rather than each of eight connections getting it.
The bucket is a plain mutex + clock rather than a per-worker allowance,
which is what makes the limit global and what will let a future daemon
share one bucket across several downloads.
Structs§
Functions§
- parse_
duration - Parse
30s,500ms,2m,1h, or a bare number of seconds. - parse_
rate - Parse
20MiB/s,20MB,1.5m,500k,1000(bytes/s).