On Fri, Aug 29, 2025, 11:57 AM Eli Zaretskii <
eliz@gnu.org> wrote:
> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Fri, 29 Aug 2025 11:43:21 -0400
> Cc: 79334@debbugs.gnu.org, eggert@cs.ucla.edu, Dmitry Gutov <dmitry@gutov.dev>
>
> Okay, so then how about we delete this unsafe thread_select and put some thread-yield calls around
> wait_reading_process_output?
I'm not objected to not calling thread_select there, but can we have
tests that will show us the gains?
The primary gain is that it becomes easier to reason about locking. I'm not sure how to write a test for that :)
Also, I think we should fix the problems with status_notify and other
users of FOR_EACH_PROCESS before we make the change with
thread_select, because current code in status_notify is definitely
wrong, and affects the related behavior.
Yes, I'll work on a patch which does both. (I'm not going to bother making a change which doesn't rely on the change to remove the thread_select, because this code is hard enough to reason about already)