If you gnu parallel (xargs++) installed - turn that second line into a script (and replace $line with $1).
cat domains.txt | parallel -n 1 -P 50 script.sh
FYI: On OSX, there is a Homebrew formula (brew install parallel).
cat domains.txt | parallel -P 100 --tag host | grep 1.2.3.4
If you gnu parallel (xargs++) installed - turn that second line into a script (and replace $line with $1).