Subject: Re: bug#45898: 27.1; wedged in redisplay again

From: Eli Zaretskii <[email-masked]>
Date: Thu, 09 Jun 2022 13:45:00 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Thu, 09 Jun 2022 12:30:07 +0200
> 
> > As for the C-g idea, I think a better and cleaner idea would be to use
> > atimers to detect signs of potentially a very long redisplay cycle,
> > and then do...something.  Not unlike what we already do with the
> > hourglass-cursor feature.
> 
> Ah, yes, that's true -- we already almost have something here via the
> hourglass thing.  Hm...  So we could call something from an atimer...
> but do we have a way to (safely) signal to redisplay that it should stop
> what it's doing?

Atimers just set a flag, and the function is invoked the first time
that flag is tested, which is currently at some random time after
that, depending on what the code does.  So this will need to be
somehow improved to make sure we don't delay the check for too long
(or maybe it is already "good enough", I don't know).

Then there's a problem of determining which window is the problematic
one.