code wiki / _hdl_build / nx_pardl.nx

nx_pardl.nx

buildroot/runtime/_hdl_build/nx_pardl.nx

2581 B50 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_pardl.nx -- PARALLEL fragment download (the performance capability yt-dlp/aria2 have via -N / --max-connection-per-server). Fork-pool: fetch `concurrency` fragments AT ONCE per batch (fork-per-fragment = the proven X-DLP idiom, and the per-fetch TLS mmap leak dies with each child), each child writes its fragment into a SHARED slot; the parent waits the batch, INTEGRITY-verifies each (nx_robust_dl), and marks the resume-state -- so parallelism composes with retry/integrity/resume, not instead of them. Measured, not checkboxed: pdl_download is timed serial-vs-parallel in the gate to REPORT the speedup axis.

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_robust_dl.nx nx_pardl.nx nx_pardl_gate.nx

imports: nx_syscalls.nxnx_robust_dl.nx

imported by: nx_pardl_gate.nx

structs

none

consts

none

functions

14func pdl_download(nfrags: i64, fragcap: i64, concurrency: i64, latency_ms: i64, sharedbuf: *u8, state: *u8) -> i64