pull upstream changes from gitstatus

pull/78/head
romkatv 2019-06-06 10:53:41 +02:00
parent eff8d47b42
commit dd4518bc39
1 changed files with 3 additions and 2 deletions

View File

@ -306,9 +306,10 @@ function gitstatus_start() {
local -i threads=${GITSTATUS_NUM_THREADS:-0} local -i threads=${GITSTATUS_NUM_THREADS:-0}
(( threads > 0)) || { (( threads > 0)) || {
threads=8
case $os in case $os in
FreeBSD) threads=$(( 2 * $(sysctl -n hw.ncpu) ));; FreeBSD) (( ! $+commands[sysctl] )) || threads=$(( 2 * $(command sysctl -n hw.ncpu) ));;
*) threads=$(( 2 * $(getconf _NPROCESSORS_ONLN) ));; *) (( ! $+commands[getconf] )) || threads=$(( 2 * $(command getconf _NPROCESSORS_ONLN) ));;
esac esac
(( threads <= 32 )) || threads=32 (( threads <= 32 )) || threads=32
} }