Subject: Re: bug#17392: 24.3.90; cursor blinks faster and faster

From: Stefan Monnier <[email-masked]>
Date: Sun, 18 May 2014 09:05:27 -0400

> sometimes when I work with Emacs for a longer time, the cursor blinks
> with a very high frequency.  When I look at the value of
> `timer-idle-list', I see multiple incarnations of blinking timers, like
> here:

I think I fixed that one, now.  Thanks you.
It was indeed linked to the "timer run is not in timer-idle-list"
situation, and it was indeed an instance of the scenario where an
earlier timer cancels a later timer.

The trick is that the earlier timer is "code that runs sit-for", since
it means that this earlier timer also runs all other timers (via
sit-for).

And removing the copy of the timer list does help, but doesn't solve the
problem: even if we don't copy the list, while running timer A, we'll
keep a pointer to the rest of the (uncopied) list; and this pointer may
point to a cons cell that gets removed from the list by cancel-timer.

        Stefan