CK_ARRAY_REMOVE(3)

✨ ck_array_remove β€” the "okay bestie you're OUT" of arrays ✨

So the manual name is CK_ARRAY_REMOVE(3), and she's serving attempt immediate or deferred removal of a pointer from an array. Yes, that's a lot of words. Basically: get this pointer OUT of this array, maybe right now, maybe later, we'll see. 🫢

LIBRARY β€” the one and only Concurrency Kit (that's libck, link her with -lck). πŸ‘‘


🌸 SYNOPSIS 🌸

#include <ck_array.h>

bool
ck_array_remove(ck_array_t *array, void *pointer);

πŸ’… DESCRIPTION πŸ’…

Okay so ck_array_remove(3) is gonna try to remove the value of pointer into the array pointed to by array. (Yes, "into" β€” that's what the page says, don't @ me, I'm just the messenger πŸŽ€)

Here's the tea though: this operation is also free to apply the operation immediately if there's an opportunity for elimination with a pending (uncommitted) put operation. Like, if there's a put just sitting there uncommitted and they cancel each other out? She will absolutely take that shortcut. Main character efficiency. ✨

But if no elimination was possible? Then the function may require to allocate more memory. πŸ™ˆ Just a lil memory moment, no big deal.


πŸ’– RETURN VALUES πŸ’–

  • It returns true if the remove operation succeeded. Slay. βœ…
  • It returns false otherwise β€” and that's because of internal allocation failures or because the value did not exist. (Rude, but valid.) 😭

πŸ¦‹ SEE ALSO πŸ¦‹

The whole girl squad, go say hi:

More lore available at http://concurrencykit.org/ 🌈


Okay that's the whole page, bestie, you ate that. πŸ’–βœ¨

This edition was dated October 18, 2013, and it belongs to CK_ARRAY_REMOVE(3). No cap. πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from