[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error
From: |
Michael Albinus |
Subject: |
bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error |
Date: |
Mon, 16 Jul 2018 16:49:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
>> When a thread has died, `thread-last-error' reports the reason. But
>> there is no possibility to cleanup this last error, which makes it
>> inconvenient to check for errors in further threads. A function
>> `cleanup-thread-last-error' or alike would be helpful.
>
> How about having thread-last-error clear the error as a side effect,
> perhaps when called with an optional argument?
I'd be happy with either variant.
> (Btw, I'd rather we made error reporting in non-main threads much more
> solid than what we have now.)
While working on making Tramp threadsafe, I use the following instead of
`signal':
(defsubst tramp-compat-signal (error-symbol data)
"Signal an error to the main thread."
(when tramp-compat-main-thread
(tramp-compat-funcall
'thread-signal tramp-compat-main-thread error-symbol data))
(signal error-symbol data))
Works sufficient so far. `tramp-compat-main-thread' is a defconst, which
has as value (car (all-threads)). And `tramp-compat-funcall' is a Tramp
internal macro, good for backward compatibility with Emacs 24 and 25.
Best regards, Michael.
PS: Maybe I shall push this to a git branch, giving people a chance for
early tests. `find-file-noselect' survives already in simple cases, w/o
an Emacs crash.
- bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error, Michael Albinus, 2018/07/16
- bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error, Eli Zaretskii, 2018/07/16
- bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error,
Michael Albinus <=
- bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error, Eli Zaretskii, 2018/07/16
- bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error, Michael Albinus, 2018/07/16
- bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error, Eli Zaretskii, 2018/07/16
- bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error, Michael Albinus, 2018/07/16
- bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error, Michael Albinus, 2018/07/17
- bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error, Eli Zaretskii, 2018/07/17