From 8e1399dbdac9dbf26d8fa00a5453bce6f2639740 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 7 Apr 2026 09:59:53 +0300 Subject: ; * doc/lispref/os.texi (Timers): Mention primitives that wait (bug#80755). --- doc/lispref/os.texi | 3 +++ 1 file changed, 3 insertions(+) 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 calls were unavoidably delayed. @end defopt +@cindex running code with timeout @defmac with-timeout (seconds timeout-forms@dots{}) body@dots{} Execute @var{body}, but give up after @var{seconds} seconds. If @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 @var{body} while it is in the midst of a computation---only when it calls one of those primitives. So use @code{with-timeout} only with a @var{body} that waits for input, not one that does a long computation. +Primitives that wait for input include @code{sit-for}, @code{sleep-for}, +@code{accept-process-output}, and some others. @end defmac The function @code{y-or-n-p-with-timeout} provides a simple way to use -- cgit v1.2.1