CK_HT_DESTROY(3)
π CK_HT_DESTROY β ok bestie, time to say bye to your hash table π
So like, this is ck_ht_destroy(3), a page from the Concurrency Kit manual, and she's here to teach you how to immediately destroy a hash table. Yes. Immediately. Not "soon". Not "whenever the scheduler feels like it". Immediately. π
β¨ LIBRARY β¨
Concurrency Kit, aka libck, and you link her with -lck. That's the whole vibe. π
β¨ SYNOPSIS β¨
#include <ck_ht.h>
void
ck_ht_destroy(ck_ht_t *ht);
Look at her. Returns void. Takes one pointer. Zero drama. π
β¨ DESCRIPTION β¨
ok so, the ck_ht_destroy() function will request that the underlying allocator β like, the one you specified back when you called ck_ht_init(3) β immediately destroy the object pointed to by the ht argument. That's it. That's the whole job. She asks the allocator, the allocator does the thing. πͺ
π¨ HOLD ON. READ THIS TWICE, BESTIE. The user must guarantee that no threads are accessing the object pointed to byhtwhenck_ht_destroy()is called. No threads. None. Zero. If somebody's still poking at it while you nuke it, that's on you and it is not going to be cute. π
β¨ RETURN VALUES β¨
ck_ht_destroy() has no return value. Nothing to check, nothing to branch on. She simply does not report back. Silent. Iconic. π¦
β¨ ERRORS β¨
This function is guaranteed not to fail. Not "probably won't". Not "unlikely to". Guaranteed. The reliability is giving main character energy fr fr. π₯
β¨ SEE ALSO β¨
The whole friend group, in order, exactly as the original rolls them out:
ck_ht_stat(3)ck_ht_init(3)ck_ht_hash(3)ck_ht_hash_direct(3)ck_ht_set_spmc(3)ck_ht_put_spmc(3)ck_ht_gc(3)ck_ht_get_spmc(3)ck_ht_grow_spmc(3)ck_ht_remove_spmc(3)ck_ht_reset_spmc(3)ck_ht_reset_size_spmc(3)ck_ht_count(3)ck_ht_entry_empty(3)ck_ht_entry_key_set(3)ck_ht_entry_key_set_direct(3)ck_ht_entry_key(3)ck_ht_entry_key_length(3)ck_ht_entry_value(3)ck_ht_entry_set(3)ck_ht_entry_set_direct(3)ck_ht_entry_key_direct(3)ck_ht_entry_value_direct(3)ck_ht_iterator_init(3)ck_ht_next(3)
And if you want even more lore, additional information is available at http://concurrencykit.org/ β go drink it in, you deserve it. π
ok that's the whole page, you ate that honestly. this was CK_HT_DESTROY(3), dated March 29, 2012, from the Concurrency Kit crew. mwah, go destroy something responsibly πβ¨π
π¦ 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 2012-2013 Samy Al Bahra
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms