CK_HT_COUNT(3)

πŸ’– CK_HT_COUNT πŸ’–

okay bestie, welcome to the CK_HT_COUNT(3) page, and yes it's from the Concurrency Kit era of your life now, we're doing this 🫢


✨ NAME ✨

ck_ht_count β€” return count of key-value pairs in hash table


πŸ“š LIBRARY πŸ“š

Concurrency Kit β€” link it with libck, so like -lck on your compile line. yes literally that's it. πŸŽ€


🌸 SYNOPSIS 🌸

#include <ck_ht.h>

uint64_t
ck_ht_count(ck_ht_t *ht);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: ck_ht_count() hands you back the number of entries chillin' in the hash table that the ht argument points at. that's the whole thing. it counts your little key-value pairs and returns them as a uint64_t. iconic behavior honestly πŸ’…

but listen, and this part is NOT optional β€” this function may only be called without the presence of concurrent write operations. like, no writers doing their writer thing while you're counting. read-only energy only. do not test her. 😭

πŸ’€ ERRORS πŸ’€

if ht has not been initialized, the behavior is undefined. not "oopsie" undefined, like actual undefined behavior, the spooky kind. initialize your table first, bestie, please, i'm begging πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

your whole little hash table friend group, all here, all slaying:

and if you want even more, Additional information available at http://concurrencykit.org/ 🌈✨


okay that's the page, ily, go count your entries responsibly πŸ’œ

Concurrency Kit Β· page date March 29, 2012 Β· CK_HT_COUNT(3) β€” mwah, bye bestie πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from