Multithreaded Bash

Avoiding leaks

Comments are moderated. It may take a few minutes before your comment appears.
Markdown is supported in your comments.

for ((i=0; i<$total; i++)); do 
    aurbar "$((i+1))" "$total" "$bartype"
    pkg="${packages[i]%% *}"
    rpcinfo_bg "$pkg" &
    while (( $(jobs | wc -l) >= 8 )); do
        sleep 0.1
        jobs > /dev/null
    done
done
wait
for ((i=0; i<$total; i++)); do
    pkg="${packages[i]%% *}"
    ver="${packages[i]##* }"
    if isignored "$pkg"; then
        checkignores+=("${packages[i]}")
    elif versionisnewer "$pkg" "$ver"; then
        newpackages+=("$pkg")
    fi
done
Name:
Mail: (not shown)

Please type this: