]> code.delx.au - gnu-emacs/commitdiff
Mention sentinels in conjunction with :nowait t.
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 22 Feb 2016 02:20:04 +0000 (13:20 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 22 Feb 2016 02:20:04 +0000 (13:20 +1100)
* doc/lispref/processes.texi (Network Processes): Mention the
recommended way of using sentinels with :nowait t.

doc/lispref/processes.texi

index 8234501fd89eb48135e4b26c369388c21552d445..79cebaa79fad343768107844bd5b3d9b8a65fe26 100644 (file)
@@ -2426,6 +2426,14 @@ Depending on the capabilities of Emacs, how asynchronous
 be done asynchronously are domain name resolution, socket setup, and
 (for TLS connections) TLS negotiation.
 
+Many functions that interact with process objects, (for instance,
+@code{process-datagram-address}) rely on them at least having a socket
+before they can return a useful value.  These functions will block
+until the socket has achieved the desired status.  The recommended way
+of interacting with asynchronous sockets is to place a sentinel on the
+process, and not try to interact with it before it has changed status
+to @samp{"run"}.  That way, none of these functions will block.
+
 @item :tls-parameters
 When opening a TLS connection, this should be where the first element
 is the TLS type (which should either be @code{gnutls-x509pki} or