CK_EPOCH_POLL(3)
π CK_EPOCH_POLL β bestie edition β¨
okay so you're in the CK_EPOCH_POLL(3) section of the manual, which means we're talking about Concurrency Kit and the whole epoch reclamation vibe. sit down, grab a strawberry π, we're doing this.
πΈ NAME πΈ
ck_epoch_poll β a non-blocking little poll of your epoch object, checking whether it's time to run dispatch cycles π
π LIBRARY π
Concurrency Kit β that's libck, and you link it with -lck. iconic. no cap. π«Ά
β¨ SYNOPSIS β¨
#include <ck_epoch.h>
bool
ck_epoch_poll(ck_epoch_record_t *record);
like, that's the whole thing. one function. one record pointer. slay.
π DESCRIPTION π
So ck_epoch_poll(3) will attempt to dispatch any functions associated with the object pointed to by epoch β those are the ones you queued up with ck_epoch_call(3) β but ONLY if it's deemed safe. safety first, always. π§
The way that this function exists is specifically for the case where the cost of epoch reclamation has to be amortized over time, in a manner that does not affect caller progress. so basically: you don't wanna pay the whole bill at once, you wanna spread it out, and you don't wanna block anyone while you do it. it's giving "responsible adult energy" but make it concurrency. π
π RETURN VALUES π
This function returns false if the following conditions are met:
- no memory was reclaimed π
- the records are not</> in a grace period
- no forward progress was made
(so like, false is the "we literally did nothing, bestie" answer. read it and weep π)
π¨ ERRORS π¨
Behavior is undefined if the object pointed to by record has not been previously registered via ck_epoch_register(3).
fr fr do NOT skip the register step. that's not a vibe, that's a crash. π
π₯ SEE ALSO π₯
ck_epoch_init(3)ck_epoch_register(3)ck_epoch_unregister(3)ck_epoch_recycle(3)ck_epoch_synchronize(3)ck_epoch_reclaim(3)ck_epoch_barrier(3)ck_epoch_call(3)ck_epoch_begin(3)ck_epoch_end(3)
Additional information available at http://concurrencykit.org/ π
and that's the whole page, bestie β this was the Concurrency Kit manual, dated September 2, 2012. yes it's old, yes it still eats, we don't talk about it. periodt. π β¨π
π¦ 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