[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crashing the new thread code
From: |
Juliusz Chroboczek |
Subject: |
Re: Crashing the new thread code |
Date: |
Sun, 11 Dec 2016 22:22:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
>> The following immediately crashes Emacs:
>>
>> (let ((thread (make-thread #'(lambda () (while t (thread-yield))))))
>> (thread-signal thread 'error nil))
> What is the semantics of signaling a thread that yields?
I'm not sure, that's why I was experimenting.
> What did you expect to happen?
The thread queues the condition and continues spinning?
> Of course, Emacs shouldn't exit, but what should it do in this case?
The condition is queued forever? On the one hand, conditions should
only be delivered in well-defined circumstances (or else unwind-protect
becomes unusable), on the other hand, I expect asynchronous signal
delivery to be reliable.
(Is the set of functions that deliver a condition is too restrictive?
I see no way to check for a queued condition without grabbing a lock.)
-- Juliusz
- Crashing the new thread code, Juliusz Chroboczek, 2016/12/11
- Re: Crashing the new thread code, Eli Zaretskii, 2016/12/11
- Re: Crashing the new thread code,
Juliusz Chroboczek <=
- Re: Crashing the new thread code, Noam Postavsky, 2016/12/11
- Re: Crashing the new thread code, Juliusz Chroboczek, 2016/12/11
- Re: Crashing the new thread code, Eli Zaretskii, 2016/12/11
- Re: Crashing the new thread code, Noam Postavsky, 2016/12/11
- Re: Crashing the new thread code, Eli Zaretskii, 2016/12/12