CK_HS_REBUILD(3)

πŸ’– NAME πŸ’–

ck_hs_rebuild β€” bestie, we're rebuilding a hash set ✨


πŸ“š LIBRARY πŸ“š

Concurrency Kit (that's libck, link it with -lck) 🫢


🌸 SYNOPSIS 🌸

#include <ck_hs.h>

bool
ck_hs_rebuild(ck_hs_t *hs);

✨ DESCRIPTION ✨

okay so. ck_hs_rebuild(3) regenerates the hash set that hs is pointing at. like, a whole glow-up for your data structure πŸ’…

here's the tea: this has the side-effect of pruning the degradatory side-effects of workloads that are delete heavy πŸ”₯ (yes bestie, all those deletes were lowkey leaving a mess behind). the regenerated hash set should have shorter probe sequences on average β€” so lookups are gonna be eating, no cap πŸ‘‘

fair warning though: this operation requires a significant amount of memory, and it's free to allocate a duplicate hash set while the rebuild is happening 😭 so make sure you've got room, bestie.


🫢 RETURN VALUES 🫢

when it works out, ck_hs_rebuild(3) returns true ✨ and otherwise it returns false on failure πŸ’€


😭 ERRORS 😭

this function will only return false if there are internal memory allocation failures. that's it, that's the whole list.


πŸ‘‘ SEE ALSO πŸ‘‘

additional information available at http://concurrencykit.org/ πŸ¦‹


and that's the whole page bestie β€” brought to you by the CK_HS_REBUILD(3) manual, dated December 7, 2013 (a true vintage icon πŸ’–), from the Concurrency Kit source. periodt βœ¨πŸŽ€

πŸ“¦ where this page comes from