From 4b53b1e31a93af8c739ba555970cb88d73063bce Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 29 Dec 2016 01:09:36 -0800 Subject: Implementation of an id hash for hashing pipes by ID. We use some hints from Python's dict implementation, using an open addressing scheme, and just ripping off the lower bits as needed. Since we assign IDs consecutively, this should work well. We shrink the table when it is only 1/8 full, and we ensure that we grow the table when it is 2/3 full. (The growth will start by at minimum doubling the required size.) --- src/core/nng_impl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/nng_impl.h') diff --git a/src/core/nng_impl.h b/src/core/nng_impl.h index f45394e9..a0a1a2e6 100644 --- a/src/core/nng_impl.h +++ b/src/core/nng_impl.h @@ -23,6 +23,7 @@ // symbols should be found in the toplevel nng.h header. #include "core/defs.h" #include "core/list.h" +#include "core/idhash.h" #include "core/init.h" #include "core/message.h" #include "core/msgqueue.h" -- cgit v1.2.3-70-g09d2