NNG_MTX_UNLOCK(3supp)
π NNG_MTX_UNLOCK π
okay so bestie, welcome to NNG_MTX_UNLOCK(3supp) from the NNG Reference Manual β this is the page about letting go of a mutex, and honestly it's giving "short but iconic." β¨
πΈ NAME πΈ
nng_mtx_unlock β unlock a mutex, aka the moment you finally release the vibe and let the other threads in π«Ά
β¨ SYNOPSIS β¨
#include <nng/nng.h>
void nng_mtx_unlock(nng_mtx *mtx);
like, that's it. two lines. main character energy fr fr π
π¦ DESCRIPTION π¦
So nng_mtx_unlock() relinquishes ownership of the mutex mtx that was previously acquired via nng_mtx_lock(). Basically: you grabbed the mic, you said your thing, now you hand the mic back. periodt. π€
β οΈ Important β and I'm gonna say this loud because it matters: a mutex can only be unlocked by the thread that locked it. Attempting to unlock a mutex that is not owned by the caller will result in undefined behavior. That's not a cute quirky bug, that's chaos. π Not me warning you twice. Do not pass go. Do not unlock a mutex that isn't yours. iykyk π
β RETURN VALUES β
None. Nothing. Nada. It's void, bestie β it does not come back with receipts. π
π ERRORS π
None. Zero. Zip. No error codes to check, no errno to stress about. π§
π SEE ALSO π
nng_mtx_alloc(3supp)β where the mutex gets born β¨nng_mtx_lock(3supp)β the one that grabs it, so you can unlock it later π₯nng(7)β the big one, the mothership πΈ
and that's the whole page, bestie β short, sweet, and absolutely not to be freestyled π
source/version: NNG Reference Manual Β· date: 2026-01-13 Β· page: NNG_MTX_UNLOCK(3supp) β mwah, love u, go unlock something you actually own ππ¦
π¦ where this page comes from
- alpine 3.24: nng-doc 1.11-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms