MCPcopy Create free account
hub / github.com/git/git / hashmap_disable_item_counting

Function hashmap_disable_item_counting

hashmap.h:530–533  ·  view source on GitHub ↗

* Disable item counting and automatic rehashing when adding/removing items. * * Normally, the hashmap keeps track of the number of items in the map * and uses it to dynamically resize it. This (both the counting and * the resizing) can cause problems when the map is being used by * threaded callers (because the hashmap code does not know about the * locking strategy used by the threaded cal

Source from the content-addressed store, hash-verified

528 * not know how to protect the "private_size" counter).
529 */
530static inline void hashmap_disable_item_counting(struct hashmap *map)
531{
532 map->do_count_items = 0;
533}
534
535/*
536 * Re-enable item counting when adding/removing items.

Callers 1

lazy_init_name_hashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected