Prevent dictRehashMilliseconds from rehashing while a safe iterator is present (#5948)
This commit is contained in:
parent
51aa08d26d
commit
88e97fe2bd
@ -239,6 +239,8 @@ long long timeInMilliseconds(void) {
|
|||||||
|
|
||||||
/* Rehash for an amount of time between ms milliseconds and ms+1 milliseconds */
|
/* Rehash for an amount of time between ms milliseconds and ms+1 milliseconds */
|
||||||
int dictRehashMilliseconds(dict *d, int ms) {
|
int dictRehashMilliseconds(dict *d, int ms) {
|
||||||
|
if (d->iterators > 0) return 0;
|
||||||
|
|
||||||
long long start = timeInMilliseconds();
|
long long start = timeInMilliseconds();
|
||||||
int rehashes = 0;
|
int rehashes = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user