GNU bug report logs -
#35400
27.0.50; Timers repeated after waking from suspend
Previous Next
Full log
View this message in rfc822 format
> There are two use cases here. One is the one we have been discussing:
> when Emacs wakes from suspension, or the machine wakes from sleep.
> The other is that somehow Emacs didn't get CPU to run, due to some
> expensive processing on the system.
Or also that Emacs did get the CPU but used it for itself running ELisp
code without stopping.
It could even be that the code it ran was the code for an earlier
invocation of that same timer.
> So maybe this should be a property of the timer itself?
I do think so, yes, but I think to fix it right we need to take a step
back and think about what it is we really want to happen, and then see
if/how we can retrofit it into the current design.
I think for the case where we missed some timer repetitions, the best
thing we can do is not to call that timer repeatedly but instead to call
it once and pass it the number of times it has fired since the last time
we ran it (so it can then freely decide to repeat its operation N times
or not).
A related issue is that for many timers, rather than "repeat every
N seconds" we'd rather want "wait N seconds between invocations" (so if
the execution of the timer terminates M seconds after the time T it was
supposed to start running, the next execution should not be scheduled
for T+N but T+M+N).
Stefan
This bug report was last modified 4 years and 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.