CK_ARRAY_LENGTH(3)

✨ CK_ARRAY_LENGTH(3) ✨

okay bestie, welcome to ck_array_length, a lil function from Concurrency Kit (that's libck, link it with -lck πŸ’…). it's short, it's sweet, and it's literally just here to count things for you. no cap.


πŸŽ€ LIBRARY πŸŽ€

Concurrency Kit β€” aka libck, and you link it with -lck. that's the whole vibe.


🌸 SYNOPSIS 🌸

#include <ck_array.h>

unsigned int
ck_array_length(ck_array_t *array);

like. that's it. one include, one function, one pointer argument. iconic behavior honestly 🫢


πŸ’– DESCRIPTION πŸ’–

so ck_array_length(3) hands you back the number of items a concurrent traversal operation would encounter at completion time.

read that again, because the wording is doing WORK. it's not "how many things are in the array right now while other threads are out here living their lives" β€” it's how many pointers a traversal would see once that traversal finishes. concurrent code is messy, timelines are fake, and this function knows it. periodt. ✨


πŸ‘‘ RETURN VALUES πŸ‘‘

it returns the number of traversal-visible pointers. that's the return value, that's the whole thing, go forth and count πŸ¦‹


πŸ”₯ SEE ALSO πŸ”₯

the whole squad, fr fr:

and if you want even more lore, it's all over at http://concurrencykit.org/ πŸ’œ


ngl bestie, if you're deep in concurrent data structure land, this one's your girl. go read the rest of the array crew, they all hang out together πŸ’€βœ¨

that's a wrap! this page is from October 18, 2013 (a vintage, an era, a moment 🌈) β€” brought to you by Concurrency Kit and the fine folks behind libck. mwah, bye! πŸ’…πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from