From 4e6a71bf2f0fdfdfe15a774a5d541aa22b8b9195 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 30 Mar 2018 16:54:36 -0700 Subject: fixes #312 idhash_walk stuff can be removed --- src/core/idhash.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/core/idhash.c b/src/core/idhash.c index 8651a3d6..2bf01d6b 100644 --- a/src/core/idhash.c +++ b/src/core/idhash.c @@ -24,7 +24,6 @@ struct nni_idhash { size_t ih_load; size_t ih_minload; // considers placeholders size_t ih_maxload; - uint32_t ih_walkers; uint64_t ih_minval; uint64_t ih_maxval; uint64_t ih_dynval; @@ -47,7 +46,6 @@ nni_idhash_init(nni_idhash **hp) h->ih_cap = 0; h->ih_maxload = 0; h->ih_minload = 0; // never shrink below this - h->ih_walkers = 0; h->ih_minval = 0; h->ih_maxval = 0xffffffff; h->ih_dynval = 0; @@ -59,7 +57,6 @@ void nni_idhash_fini(nni_idhash *h) { if (h != NULL) { - NNI_ASSERT(h->ih_walkers == 0); if (h->ih_entries != NULL) { NNI_FREE_STRUCTS(h->ih_entries, h->ih_cap); h->ih_entries = NULL; @@ -144,11 +141,6 @@ nni_hash_resize(nni_idhash *h) // No resize needed. return (0); } - if (h->ih_walkers && (h->ih_load < (h->ih_cap - 1))) { - // Don't resize when walkers are running. This way - // walk functions can remove hash nodes. - return (0); - } oldsize = h->ih_cap; -- cgit v1.2.3-70-g09d2