NNG_AIO_CANCEL(3)

πŸ“¦
version 1.12.0 Β· 4 versions
, in ubuntu stonking

πŸ’– nng_aio_cancel β€” cancel asynchronous I/O operation πŸ’–

okay bestie so this is nng_aio_cancel from the NNG Reference Manual, and she's literally the ✨girlboss✨ of "never mind, stop that" πŸ’…


✨ SYNOPSIS ✨

#include <nng/nng.h>

void nng_aio_cancel(nng_aio *aio);

like look at her. clean. simple. no return value. iconic. πŸ‘‘


🌸 DESCRIPTION 🌸

okay so here's the tea πŸ“ β€” nng_aio_cancel() aborts an operation that you previously started with the handle aio.

and when the operation actually gets aborted? the callback for that handle gets called πŸ“ž, and nng_aio_result() will come back handing you the error NNG_ECANCELED. so fr fr, you'll know.

now β€” and this part is important, don't skip it β€” this function does not wait around for the operation to be fully aborted. she does not sit there tapping her acrylics waiting for closure. she returns immediately. πŸƒβ™€οΈπŸ’¨ she said "I sent the text, I'm moving on."

and if there's no operation currently in progress? like, either it already finished, or you never started one in the first place? then this function just... has no effect. nothing. zip. it's giving "hey bestie are you okay" "yeah I just have nothing to cancel" πŸ’€

Note πŸ™ˆ β€” this function is the same as calling nng_aio_abort() with the error NNG_ECANCELED. same energy, different name, they're twins πŸ‘―β™€οΈ

πŸŽ€ RETURN VALUES πŸŽ€

None.

nothing. it's void. she gives you no receipts, no nothing. 🫢


πŸ¦‹ ERRORS πŸ¦‹

None.

zero errors. cannot fail. cannot be stopped (except the operation itself, which is literally the point). slay. ✨


🌈 SEE ALSO 🌈

go read those too, bestie, iykyk πŸ’œ


and that's a wrap on this page from the NNG Reference Manual, dated 2026-06-30 🌸 mwah, take care of yourself, hydrate, and cancel those async ops with confidence. periodt. πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from