aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2026-04-07 09:59:53 +0300
committerEli Zaretskii2026-04-07 09:59:53 +0300
commit8e1399dbdac9dbf26d8fa00a5453bce6f2639740 (patch)
tree5a3c1200a811d1332d5c4602fd205bea70b23611
parent7ce60be53e7ffbc1972dd8e98744adf6103eee9e (diff)
downloademacs-8e1399dbdac9dbf26d8fa00a5453bce6f2639740.tar.gz
emacs-8e1399dbdac9dbf26d8fa00a5453bce6f2639740.zip
; * doc/lispref/os.texi (Timers): Mention primitives that wait (bug#80755).
-rw-r--r--doc/lispref/os.texi3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 38d7ad44c4a..72a1fdc7878 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2382,6 +2382,7 @@ calling a timer function in a row, when many previously scheduled
2382calls were unavoidably delayed. 2382calls were unavoidably delayed.
2383@end defopt 2383@end defopt
2384 2384
2385@cindex running code with timeout
2385@defmac with-timeout (seconds timeout-forms@dots{}) body@dots{} 2386@defmac with-timeout (seconds timeout-forms@dots{}) body@dots{}
2386Execute @var{body}, but give up after @var{seconds} seconds. If 2387Execute @var{body}, but give up after @var{seconds} seconds. If
2387@var{body} finishes before the time is up, @code{with-timeout} returns 2388@var{body} finishes before the time is up, @code{with-timeout} returns
@@ -2400,6 +2401,8 @@ primitive that can wait, @code{with-timeout} cannot stop executing
2400@var{body} while it is in the midst of a computation---only when it 2401@var{body} while it is in the midst of a computation---only when it
2401calls one of those primitives. So use @code{with-timeout} only with a 2402calls one of those primitives. So use @code{with-timeout} only with a
2402@var{body} that waits for input, not one that does a long computation. 2403@var{body} that waits for input, not one that does a long computation.
2404Primitives that wait for input include @code{sit-for}, @code{sleep-for},
2405@code{accept-process-output}, and some others.
2403@end defmac 2406@end defmac
2404 2407
2405 The function @code{y-or-n-p-with-timeout} provides a simple way to use 2408 The function @code{y-or-n-p-with-timeout} provides a simple way to use