aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.h
diff options
context:
space:
mode:
authorMichael Albinus2018-07-22 11:53:24 +0200
committerMichael Albinus2018-07-22 11:53:24 +0200
commite23727978dbb07d68f730ffa60b22d59d065850e (patch)
tree7ed37a1f0078ba6032a7d924f218c764330a98c8 /src/thread.h
parentb7ca3d5d932bad6900296679ab87f7d0d64d1de9 (diff)
downloademacs-e23727978dbb07d68f730ffa60b22d59d065850e.tar.gz
emacs-e23727978dbb07d68f730ffa60b22d59d065850e.zip
thread-join returns the result of finished thread
* doc/lispref/threads.texi (Basic Thread Functions): * etc/NEWS: Document return value of `thread-join'. * src/thread.c (invoke_thread_function, Fmake_thread) (init_main_thread): Set result. (Fthread_join): Propagate signals, and return result. (Vmain_thread): New defvar. * src/thread.h (struct thread_state): Add `result' field. * test/src/thread-tests.el (threads-join): Test also return value. (threads-join-error): New test. (threads-mutex-signal): Check for propagation of `quit' signal.
Diffstat (limited to 'src/thread.h')
-rw-r--r--src/thread.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/thread.h b/src/thread.h
index c10e5ecb758..922eea62178 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -52,6 +52,9 @@ struct thread_state
52 /* The thread's function. */ 52 /* The thread's function. */
53 Lisp_Object function; 53 Lisp_Object function;
54 54
55 /* The thread's result, if function has finished. */
56 Lisp_Object result;
57
55 /* If non-nil, this thread has been signaled. */ 58 /* If non-nil, this thread has been signaled. */
56 Lisp_Object error_symbol; 59 Lisp_Object error_symbol;
57 Lisp_Object error_data; 60 Lisp_Object error_data;