aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGemini Lasswell2018-08-14 11:08:28 -0700
committerGemini Lasswell2018-09-09 07:41:49 -0700
commite19ca77534002ae118acb707cf6313df1a908814 (patch)
tree849b231910bd9cf3e9a0f6462ece0a51fc7cf2d7
parent3fb8f306475a87a30a7dd68387d8da859cffc90a (diff)
downloademacs-e19ca77534002ae118acb707cf6313df1a908814.tar.gz
emacs-e19ca77534002ae118acb707cf6313df1a908814.zip
Document list-threads and its buffer
* doc/lispref/threads.texi (Threads): Add menu item. (The Thread List): New node. * doc/lispref/elisp.texi (Top): Add menu item.
-rw-r--r--doc/lispref/elisp.texi1
-rw-r--r--doc/lispref/threads.texi47
-rw-r--r--etc/NEWS3
3 files changed, 51 insertions, 0 deletions
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 1d861fbced4..0a445a36bd3 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1346,6 +1346,7 @@ Threads
1346* Basic Thread Functions:: Basic thread functions. 1346* Basic Thread Functions:: Basic thread functions.
1347* Mutexes:: Mutexes allow exclusive access to data. 1347* Mutexes:: Mutexes allow exclusive access to data.
1348* Condition Variables:: Inter-thread events. 1348* Condition Variables:: Inter-thread events.
1349* The Thread List:: Show the active threads.
1349 1350
1350Processes 1351Processes
1351 1352
diff --git a/doc/lispref/threads.texi b/doc/lispref/threads.texi
index 9cdeb798c1d..a4a1af30857 100644
--- a/doc/lispref/threads.texi
+++ b/doc/lispref/threads.texi
@@ -45,6 +45,7 @@ closure are shared by any threads invoking the closure.
45* Basic Thread Functions:: Basic thread functions. 45* Basic Thread Functions:: Basic thread functions.
46* Mutexes:: Mutexes allow exclusive access to data. 46* Mutexes:: Mutexes allow exclusive access to data.
47* Condition Variables:: Inter-thread events. 47* Condition Variables:: Inter-thread events.
48* The Thread List:: Show the active threads.
48@end menu 49@end menu
49 50
50@node Basic Thread Functions 51@node Basic Thread Functions
@@ -271,3 +272,49 @@ Return the name of @var{cond}, as passed to
271Return the mutex associated with @var{cond}. Note that the associated 272Return the mutex associated with @var{cond}. Note that the associated
272mutex cannot be changed. 273mutex cannot be changed.
273@end defun 274@end defun
275
276@node The Thread List
277@section The Thread List
278
279@cindex thread list
280@cindex list of threads
281@findex list-threads
282The @code{list-threads} command lists all the currently alive threads.
283In the resulting buffer, each thread is identified either by the name
284passed to @code{make-thread}, or by its unique internal identifier if
285it was not created with a name. The status of each thread at the time
286of the creation or last update of the buffer is shown, in addition to
287the object the thread was blocked on at the time, if it was blocked.
288
289@vindex thread-list-refresh-seconds
290The @file{*Threads*} buffer will automatically update twice per
291second. To make the refresh rate faster or slower, customize
292@code{thread-list-refresh-seconds}.
293
294Here are the commands available in the thread list buffer:
295
296@table @kbd
297
298@cindex backtrace of thread
299@cindex thread backtrace
300@item b
301Show a backtrace of the thread at point. This will show where in its
302code the thread had yielded or was blocked at the moment you pressed
303@kbd{b}. Be aware that by the time you see the backtrace, the thread
304may have resumed execution, and be in a different section of code, or
305be completed.
306
307You may use @kbd{g} in the thread's backtrace buffer to get an updated
308backtrace, as backtrace buffers do not automatically update.
309@xref{Backtraces}, for a description of backtraces and the other
310commands which work on them.
311
312@item s
313Send a signal to the thread at point. After @kbd{s}, type @kbd{q} to
314send a quit signal or @kbd{e} to send an error signal. Only do this
315if you understand how to restart the target thread, because your Emacs
316session may behave incorrectly if necessary threads are killed.
317
318@item g
319Update the list of threads and their statuses.
320@end table
diff --git a/etc/NEWS b/etc/NEWS
index 61b6d4e0e2b..2e4ed5ddf9f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -737,6 +737,9 @@ Instead, error messages are just printed in the main thread.
737--- 737---
738*** 'thread-alive-p' is now obsolete, use 'thread-live-p' instead. 738*** 'thread-alive-p' is now obsolete, use 'thread-live-p' instead.
739 739
740+++
741*** 'list-threads' displays the live threads in a tabulated-list buffer.
742
740--- 743---
741** thingatpt.el supports a new "thing" called 'uuid'. 744** thingatpt.el supports a new "thing" called 'uuid'.
742A symbol 'uuid' can be passed to thing-at-point and it returns the 745A symbol 'uuid' can be passed to thing-at-point and it returns the