CK_RHS_REBUILD(3)
β¨ CK_RHS_REBUILD(3) β¨
okay bestie, gather round, because this little function is the glow-up your hash set has been begging for π
it lives in ck_rhs_rebuild and yes it's a real manual page from the Concurrency Kit (that's libck, link it with -lck) so let's get into it π
π¦ NAME π¦
ck_rhs_rebuild β rebuild a hash set. that's it. that's the whole job. iconic behavior fr β¨
πΈ LIBRARY πΈ
Concurrency Kit (aka libck, and you link it with -lck) π«Ά
π SYNOPSIS π
#include <ck_rhs.h>
bool
ck_rhs_rebuild(ck_rhs_t *hs);
look at that signature. clean. minimal. main character energy π
β¨ DESCRIPTION β¨
so like, the ck_rhs_rebuild(3) function will regenerate the hash set that hs is pointing at. lowkey a whole reset-and-refresh moment for your data structure π§βοΈ
and here's the tea: this has the side-effect of pruning degradatory side-effects of workloads that are delete heavy. so if your workload has been doing a lot of deleting, the hash set starts getting a lil crusty, and this is the self-care routine that fixes it. the regenerated hash set should have shorter probe sequences on average, which is the whole point β faster lookups, happier you, slay π
β οΈ but bestie, listen: this operation will require a significant amount of memory, and it is free to allocate a duplicate hash set in the rebuild process. so like, it might literally build a whole second copy of the set while it works. make sure you've got the room before you go doing all that π
π RETURN VALUES π
when it works out, ck_rhs_rebuild(3) returns true π
and if it doesn't, it returns false π that's the whole deal.
π ERRORS π
good news fr fr: this function will only return false if there are internal memory allocation failures. that's the only L it can take. no other drama π
π SEE ALSO π
ck_rhs_init(3)ck_rhs_move(3)ck_rhs_destroy(3)CK_RHS_HASH(3)ck_rhs_iterator_init(3)ck_rhs_next(3)ck_rhs_get(3)ck_rhs_put(3)ck_rhs_put_unique(3)ck_rhs_set(3)ck_rhs_fas(3)ck_rhs_gc(3)ck_rhs_grow(3)ck_rhs_remove(3)ck_rhs_count(3)ck_rhs_reset(3)ck_rhs_reset_size(3)ck_rhs_stat(3)
additional information available at http://concurrencykit.org/ β go peek, iykyk π
and that's the whole page bestie!! this one's from Concurrency Kit, dated December 7, 2013, and it's filed under CK_RHS_REBUILD(3) π go forth and rebuild those hash sets, you've totally got this π¦β¨π
π¦ where this page comes from
- alpine 3.24: ck-doc 0.7.2-r1 Β· BSD-2-Clause AND Apache-2.0
- debian bookworm: libck-dev 0.7.1-10 Β· BSD-2-Clause
- debian trixie: libck-dev 0.7.2-6 Β· BSD-2-Clause
- epel 10: ck-devel 0.7.2-1.el10_1 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- epel 9: ck-devel 0.7.0-10.el9 Β· BSD
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- nixos 26.05: ck 0.7.2
- nixpkgs unstable: ck 0.7.2
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- ubuntu jammy: libck-dev 0.7.1-6ubuntu2 Β· BSD-2-Clause
- ubuntu noble: libck-dev 0.7.1-13build1 Β· BSD-2-Clause
- ubuntu questing: libck-dev 0.7.2-5ubuntu1
- ubuntu resolute: libck-dev 0.7.2-5ubuntu2 Β· BSD-2-Clause
- ubuntu stonking: libck-dev 0.7.2-11 Β· BSD-2-Clause
- Copyright 2013 Samy Al Bahra
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms