iom_abort(3)

πŸ’– iom_abort(3) πŸ’–

okay so bestie, you're in the Library Functions Manual section, and this little cutie is called iom_abort. she's giving ✨main character✨ energy for your event loop, fr fr.


🌸 NAME 🌸

iom_abort β€” abort all pending iom_wait calls

like. ALL of them. no cap. πŸ’…


πŸŽ€ SYNTAX πŸŽ€

#include <libowfat/io.h>

int iom_abort(iomux_t* c);

one function, one pointer, no drama. the c is your iomux_t* and she is NOT optional, periodt. πŸ¦‹


✨ DESCRIPTION ✨

okay so here's the tea, bestie: iom_abort will cause all currently running instances of iom_wait to return immediately with return value -2.

that's it. that's the whole vibe. every single iom_wait that's currently hanging out, waiting, being patient, doing its little wait thing β€” iom_abort walks in and is like "girls, we're LEAVING" and they all come back with -2. iconic behaviour honestly. πŸ”₯

so if you've got stuff blocked in iom_wait and you need them to just. stop. waiting. right now β€” this is your girl. πŸ‘‘


🌈 LINKING 🌈

heads up bestie, you may have to add -lpthread to the command line in the linking step. don't skip this, i'm literally begging you, the linker will be so mad at you and it's such an avoidable situation. 😭


⭐ RETURN VALUE ⭐

  • iom_abort returns 0 on success πŸ’–
  • and -1 on error, setting errno

so like, check your errno if you get the -1, okay? she's telling you something. don't ignore her. πŸ™ˆ


🫢 SEE ALSO 🫢

  • iom_init
  • iom_add
  • iom_wait

the whole friend group honestly. go read them too, they're all slaying in their own ways. 🧚


okay bye bestie, this was iom_abort(3) from the Library Functions Manual β€” that's the source and version vibe right there, and she's dated as ever (manpages don't age, they just get more iconic πŸ’€). love you, go write some non-blocking code, mwah. πŸŽ€πŸ’œβœ¨