diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-03-30 16:54:36 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-03-30 16:54:36 -0700 |
| commit | 4e6a71bf2f0fdfdfe15a774a5d541aa22b8b9195 (patch) | |
| tree | 27aef2ff0f13013da165c0087e58e1d11616d0d1 /src | |
| parent | 5ee340ed219f42a78a0c1dc2976d220f97c286a3 (diff) | |
| download | nng-4e6a71bf2f0fdfdfe15a774a5d541aa22b8b9195.tar.gz nng-4e6a71bf2f0fdfdfe15a774a5d541aa22b8b9195.tar.bz2 nng-4e6a71bf2f0fdfdfe15a774a5d541aa22b8b9195.zip | |
fixes #312 idhash_walk stuff can be removed
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/idhash.c | 8 |
1 files changed, 0 insertions, 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; |
