dang and u did all that without a 10 year journey
10 years represents going from
maxJobs=$(nprocs) while read -r nn; do code_to_parallelize "$nn" (( $(jobs -p | wc -l) > maxJobs )) && wait -n done < inputs
10 years represents going from
to a NUMA-Aware Contention-Free Dynamically-Auto-Tuning Bash-Native Streaming Parallelization Engine. I dare say 10 years is about the norm for going from "beginner" to "PhD-level" work.