Rudimentary error handling for non-main threads
commit571532605bc0db221c76e36067435e4355e0d1a1
authorEli Zaretskii <eliz@gnu.org>
Wed, 18 Jan 2017 16:00:16 +0000 (18 18:00 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 18 Jan 2017 16:00:16 +0000 (18 18:00 +0200)
tree5a8120468d552a682c5bbfc1ec9f83c80d364b11
parentdbb29d7eb428dd53617d31a9cc159d889deb1e8e
Rudimentary error handling for non-main threads

* src/thread.c (last_thread_error): New static variable.
(syms_of_threads): Staticpro it.
(record_thread_error, Fthread_last_error): New functions.
(syms_of_threads): Defsubr Fthread_last_error.

* doc/lispref/threads.texi (Basic Thread Functions): Document
thread-last-error.

* test/src/thread-tests.el (thread-errors, thread-signal-early)
(threads-condvar-wait): Test the values returned by
thread-last-error.
doc/lispref/threads.texi
src/thread.c
test/src/thread-tests.el