]> git.ipfire.org Git - thirdparty/git.git/commit - hashmap.h
hashmap: add disallow_rehash setting
authorJeff Hostetler <jeffhost@microsoft.com>
Wed, 22 Mar 2017 17:14:22 +0000 (17:14 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Mar 2017 20:41:41 +0000 (13:41 -0700)
commit0607e10009ee4e37cb49b4cec8d28a9dda1656a4
tree1c4faeee2a69a761d2a6257fa2741750dec43723
parentf75619bd6d21760e1da416d4e27bce6468beffcd
hashmap: add disallow_rehash setting

Teach hashmap to allow rehashes to be suppressed.
This is useful when hashmaps are accessed by multiple
threads.  It still requires the caller to properly
manage their locking.  This just prevents unexpected
rehashing during inserts and deletes.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hashmap.c
hashmap.h