rehash: try to sleep in 0.1 sec steps when acquiring lock

This commit is contained in:
Ville Skyttä 2020-12-05 18:08:16 +02:00
parent 511756f0c7
commit c0ea15226d

View file

@ -45,8 +45,8 @@ for (( i=1; i<="${PYENV_REHASH_TIMEOUT:-60}"; i++ )); do
acquired=1 acquired=1
break break
else else
# POSIX sleep(1) doesn't provides time precision of subsecond # POSIX sleep(1) doesn't provide subsecond precision, but many others do
sleep 1 sleep 0.1 2>/dev/null || sleep 1
fi fi
done done