diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2018-07-22 11:53:24 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2018-07-22 11:53:24 +0200 |
commit | e23727978dbb07d68f730ffa60b22d59d065850e (patch) | |
tree | 7ed37a1f0078ba6032a7d924f218c764330a98c8 /src/thread.h | |
parent | b7ca3d5d932bad6900296679ab87f7d0d64d1de9 (diff) | |
download | emacs-e23727978dbb07d68f730ffa60b22d59d065850e.tar.gz |
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.h | 3 |
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 /* The thread's function. */ Lisp_Object function; + /* The thread's result, if function has finished. */ + Lisp_Object result; + /* If non-nil, this thread has been signaled. */ Lisp_Object error_symbol; Lisp_Object error_data; |