aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2023-11-26 12:24:33 -0800
committerGarrett D'Amore <garrett@damore.org>2023-11-26 12:26:10 -0800
commit3b4d88105f791a6868f46095e5bc2734441c9463 (patch)
tree56b78863a43df4ffe7a1f79d8da58e059d599158 /docs
parent5c1532aa69339ee9995652239881b715c3067418 (diff)
downloadnng-3b4d88105f791a6868f46095e5bc2734441c9463.tar.gz
nng-3b4d88105f791a6868f46095e5bc2734441c9463.tar.bz2
nng-3b4d88105f791a6868f46095e5bc2734441c9463.zip
fixes #1665 docs: document restriction for pipe notify callbacks
One must not attempt to use any functions that access the socket directly from pipe notification callbacks.
Diffstat (limited to 'docs')
-rw-r--r--docs/man/nng_pipe_notify.3.adoc4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/man/nng_pipe_notify.3.adoc b/docs/man/nng_pipe_notify.3.adoc
index 8bb9fcfd..e351129e 100644
--- a/docs/man/nng_pipe_notify.3.adoc
+++ b/docs/man/nng_pipe_notify.3.adoc
@@ -60,6 +60,10 @@ from the socket.
The underlying transport may be closed at this point, and it is not
possible communicate using this pipe.
+WARNING: The callback _cb_ function must *not* attempt to perform any
+accesses to the socket, as it is called with a lock on the socket held!
+Doing so would thus result in a deadlock.
+
TIP: The callback _cb_ may close a pipe for any reason by simply closing
it using xref:nng_pipe_close.3.adoc[`nng_pipe_close()`].
This might be done before the pipe is added to the socket (during