Prevent dictRehashMilliseconds from rehashing while a safe iterator is present (#5948)

This commit is contained in:
Jim Brunner 2020-08-10 22:36:34 -07:00 committed by GitHub
parent 51aa08d26d
commit 88e97fe2bd

View File

@ -239,6 +239,8 @@ long long timeInMilliseconds(void) {
/* Rehash for an amount of time between ms milliseconds and ms+1 milliseconds */
int dictRehashMilliseconds(dict *d, int ms) {
if (d->iterators > 0) return 0;
long long start = timeInMilliseconds();
int rehashes = 0;