diff options
| author | Eli Zaretskii | 2026-04-07 09:59:53 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2026-04-07 09:59:53 +0300 |
| commit | 8e1399dbdac9dbf26d8fa00a5453bce6f2639740 (patch) | |
| tree | 5a3c1200a811d1332d5c4602fd205bea70b23611 | |
| parent | 7ce60be53e7ffbc1972dd8e98744adf6103eee9e (diff) | |
| download | emacs-8e1399dbdac9dbf26d8fa00a5453bce6f2639740.tar.gz emacs-8e1399dbdac9dbf26d8fa00a5453bce6f2639740.zip | |
; * doc/lispref/os.texi (Timers): Mention primitives that wait (bug#80755).
| -rw-r--r-- | doc/lispref/os.texi | 3 |
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 | |||
| 2382 | calls were unavoidably delayed. | 2382 | calls 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{} |
| 2386 | Execute @var{body}, but give up after @var{seconds} seconds. If | 2387 | Execute @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 |
| 2401 | calls one of those primitives. So use @code{with-timeout} only with a | 2402 | calls 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. |
| 2404 | Primitives 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 |