GNU bug report logs -
#4954
23.1; Emacs hangs when two run-at-time calls in effect
Previous Next
Reported by: Sullivan Beck <sulbeck <at> ufl.edu>
Date: Wed, 18 Nov 2009 15:50:04 UTC
Severity: normal
Tags: moreinfo
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Wed, Nov 18, 2009 at 4:41 PM, Sullivan Beck <sulbeck <at> ufl.edu> wrote:
> I wrote two simple emacs extensions, both of which use the run-at-time
> function periodically write some information to a file. When one or the
> other is loaded, emacs works fine. When both are loaded, emacs will work
> fine for a while, and then suddently start behaving very sluggishly.
> Keyboard input will not be printed on the screen for 2-4 seconds. It
> never seems to recover (though the periodic work should only take a
> fraction of a second) and eventually, I have to kill emacs and restart.
>
> I'll include both extensions below, though I don't believe that either
> of them are directly related to the cause of the problem... it just
> happened that they both use run-at-time.
Hi Sullivan,
I do not know what causes the hang, but I can guess. In both your
extensions you are saving data to a file. I wonder if that operation
is syncronous? If it is then all Emacs can do is to wait there. (File
operations can be both async and sync and I do not know what Emacs is
doing.)
A way to work around the trouble is perhaps to rewrite your scheduling
of the saving operations. Here is one suggestion:
- Instead of saving immediately in the timer start a second timer with
run-with-idle-timer.
- In that timer do the saving.
This makes the chance that the saving will occur while you are typing
a bit smaller, but it does not avoid the trouble totally.
This bug report was last modified 3 years and 322 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.