NNG_AIO_STOP(3)
β¨ NAME β¨
nng_aio_stop β stoppp that asynchronous I/O operation bestie, we're done here π
It's from the NNG Reference Manual, section 3, and honestly? It's giving "clean shutdown" and I'm obsessed π«Ά
πΈ SYNOPSIS πΈ
#include <nng/nng.h>
void nng_aio_stop(nng_aio *aio);
π DESCRIPTION π
Okay so nng_aio_stop() is the girl who ends things properly. She takes the asynchronous I/O operation hanging out with aio and stops it by aborting it with NNG_ECANCELED π β and then she doesn't just walk away. No ma'am. She waits for it to fully complete or to be completely aborted, and she also waits for the callback that's attached to the aio to finish executing. Full closure. Main character behaviour fr fr π
And after all that? Any further calls to nng_aio_begin() using this aio will return false. Like, it's over over. The door is closed, the lights are off, the vibe is sealed β¨
The iconic part: it is safe to call this for an aio even when literally no operation is currently pending for it. Zero drama, zero judgement. She just handles it π
Tip π§ When you've got multiple asynchronous I/O handles in use and they all need to be shut down, it is safest to stop all of them before deallocating any of them with nng_aio_free(). Especially if the callbacks might try to reschedule additional operations β like, do NOT free first, that's a jump scare. Stop everything, then free. Periodt π
π RETURN VALUES π
None. She gives you nothing back because she already gave you everything π«Ά
π ERRORS π
None. No errors, no notes, we love a flawless queen π
π¦ SEE ALSO π¦
nng_aio_alloc(3)nng_aio_cancel(3)nng_aio_free(3)nng_aio_begin(3)nng_aio_wait(3)nng_aio(5)nng(7)
okay that's the whole page, go stop your async ops responsibly bestie πβ¨
This lil drop is from the NNG Reference Manual, dated 2026-06-30. Drink water, close your handles, 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