mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
rehash: try to sleep in 0.1 sec steps when acquiring lock
This commit is contained in:
parent
511756f0c7
commit
c0ea15226d
1 changed files with 2 additions and 2 deletions
|
@ -45,8 +45,8 @@ for (( i=1; i<="${PYENV_REHASH_TIMEOUT:-60}"; i++ )); do
|
|||
acquired=1
|
||||
break
|
||||
else
|
||||
# POSIX sleep(1) doesn't provides time precision of subsecond
|
||||
sleep 1
|
||||
# POSIX sleep(1) doesn't provide subsecond precision, but many others do
|
||||
sleep 0.1 2>/dev/null || sleep 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue