From: Juliusz Chroboczek <jch@irif.fr>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: Crashing the new thread code
Date: Sun, 11 Dec 2016 22:22:34 +0100 [thread overview]
Message-ID: <87d1gy2mat.fsf@irif.fr> (raw)
In-Reply-To: 83twaacii3.fsf@gnu.org
>> 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
next prev parent reply other threads:[~2016-12-11 21:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-11 18:37 Crashing the new thread code Juliusz Chroboczek
2016-12-11 20:34 ` Eli Zaretskii
2016-12-11 21:22 ` Juliusz Chroboczek [this message]
2016-12-11 21:58 ` Noam Postavsky
2016-12-11 22:56 ` Juliusz Chroboczek
2016-12-12 3:41 ` Eli Zaretskii
2016-12-12 4:10 ` Noam Postavsky
2016-12-12 17:11 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1gy2mat.fsf@irif.fr \
--to=jch@irif.fr \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.