Subject: bug#79367: 31.0.50; magit-commit sometimes doesn't work if diff-hl-update-async is t

From: Eli Zaretskii <[email-masked]>
Date: Wed, 03 Sep 2025 16:15:42 +0300

> Date: Wed, 3 Sep 2025 15:17:42 +0300
> Cc: [email-masked], [email-masked], [email-masked]
> From: Dmitry Gutov <[email-masked]>
> 
> On 03/09/2025 14:57, Eli Zaretskii wrote:
> >> Maybe to start something, do we expect some Comint functionality to be
> >> broken when background threads exist and perhaps call
> >> 'accept-process-output' with nil, in a loop?
> >>
> >> Such as comint-redirect-results-list-from-process or comint-proc-query,
> >> for example.
> > If the process is locked to the thread which runs
> > comint-redirect-results-list-from-process, I wouldn't expect problems
> > there.  But it would be good for someone to look into this, sure.
> 
> Right, I meant the unlocked configuration (this could be an evidence of 
> it being bad default).

I'm not familiar with the expectations of this function.  Is it
expected to wait in a loop until PROCESS exits, and process the
output only then?  If yes, the only question is what happens when
PROCESS exits while another thread has the global lock.  This is
related to a problem discussed in bug#79334, so maybe we should
revisit this when that bug is deemed solved.