NNG_AIO_FINISH(3)
π NNG_AIO_FINISH(3) π
okay bestie, welcome to the NNG Reference Manual section on nng_aio_finish β this one's short but she is IMPORTANT, so pay attention, no skimming π«Ά
β¨ NAME β¨
nng_aio_finish β bestie, we are finishing an asynchronous I/O operation π
β¨ SYNOPSIS β¨
#include <nng/nng.h>
void nng_aio_finish(nng_aio *aio, int err);
β¨ DESCRIPTION β¨
okay so nng_aio_finish() is the function that goes "this operation? done. finished. periodt." π
It marks the operation associated with aio as complete, with the status err. That status is literally the result that nng_aio_result() is gonna hand back to whoever's waiting. like, it's the whole point. π¦
And bestie, it also causes the callback associated with the aio to be called. so like, the callback gets its moment. iconic behavior honestly β¨
Important π¨ It is mandatory that operation providers call this function exactly once when they are finished with the operation. not twice, not zero times β exactly once. And after calling this function they must not perform any further accesses to the aio. like, that pointer? it's over for you. don't touch it. π₯
Note πΈ This function is only for I/O providers β the ones actually performing the operation, like HTTP handler functions or transport providers. ordinary users of the aio should not have any need for this function. so if you're just vibing with an aio as a regular user, this is not your girl. iykyk π
β¨ RETURN VALUES β¨
None. literally nothing comes back. void. empty. a whole lot of nothing π
β¨ ERRORS β¨
None. no errors to report, no codes to check, nothing to stress about π
β¨ SEE ALSO β¨
nng_aio_alloc(3)nng_aio_begin(3)nng_aio_cancel(3)nng_aio_defer(3)nng_aio_result(3)nng_aio(5)nng(7)
and that's the whole page bestie, you ate that π go forth and finish your async I/O operations exactly once, no cap π
π NNG Reference Manual Β· 2026-06-30 Β· mwah, love u, bye π
π¦ where this page comes from
- ubuntu stonking: libnng-dev 1.12.0-1 Β· MIT OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms