Subject: bug#79228: 30.1.90; native--compile-async sentinel can error if threads are running

From: Spencer Baugh <[email-masked]>
Date: Tue, 02 Sep 2025 10:40:53 -0400

Eli Zaretskii <[email-masked]> writes:

>> From: Spencer Baugh <[email-masked]>
>> Cc: [email-masked],  [email-masked],  [email-masked],  [email-masked]
>> Date: Tue, 02 Sep 2025 09:18:12 -0400
>> 
>> > And it's unjustified, since if worse comes to worst, we can simply
>> > unlock the process that performs async compilation.  No need to reach
>> > far-fetched conclusions about processes in general because of this
>> > specific case.
>> 
>> Okay, then this patch should fix the bug.
>
> But does it?  You've brought up the issue, so presumably you have a
> way of recreating the problem.

Not easily, but fine, I did some more work to figure out a reliable
reproduction:

1. Delete eln-cache
2. emacs -Q --eval '(dotimes (_ 5) (make-thread (lambda () (while t (sit-for 1)))))'
3. Observe errors in *Messages* from native compilation

> Then please try this patch and tell whether it indeed solves the
> problem.

Yes, it does.