all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Joe Wells <jbw@rzlab.ucr.edu>
Cc: bug-gnu-emacs@gnu.org, 300@emacsbugs.donarmstrong.com
Subject: bug#300: strange interaction of periodic timers and suspending Emacs 22.1
Date: Fri, 23 May 2008 17:17:31 -0400	[thread overview]
Message-ID: <jwvwslkzpun.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <86tzgq3ymq.fsf@macs.hw.ac.uk> (Joe Wells's message of "Thu, 22 May 2008 20:52:13 +0100")

> When Emacs 22.1 resumes from being suspended, it will execute a
> periodic timer once for each time it would have executed it if Emacs
> had never been suspended.  The same thing happens when the entire
> computer is suspended (i.e., hibernation (suspend to disk) or sleep
> (suspend to RAM)).

I seem to remember a discussion about this a couple years ago.
Does anybody remember something about it?

> While it is conceivable that some uses of timers might prefer the
> current behavior, in the vast majority of cases a timer does a
> recurrent task and there is no benefit from repeating the timer
> zillions of times in a row.  In fact, this can cause Emacs to freeze
> for a long time when resuming due to processing periodic timers if the
> timers do significant work.

Yes, that sounds like a problem.  Do you have an actual case where this
currently happens?  We have enough real-life problems to fix, so if this
problem is only theoretical it's less likely to get fixed soon.

> In addition to wanting to see this problem fixed, I would also be
> interested to hear of a reliable way to work around it.

A reliable way is to make your timer non-repeated and instead to re-arm
it manually at its end.  This also helps when your timer takes more time
to process than its expected frequency.


        Stefan






  reply	other threads:[~2008-05-23 21:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <jwvr6bk7arz.fsf-monnier+emacsbugreports@gnu.org>
2008-05-22 19:52 ` bug#300: strange interaction of periodic timers and suspending Emacs 22.1 Joe Wells
2008-05-23 21:17   ` Stefan Monnier [this message]
     [not found]   ` <mailman.12118.1211578329.18990.bug-gnu-emacs@gnu.org>
2008-05-29 11:50     ` Joe Wells
2008-05-30  3:10   ` bug#300: marked as done (strange interaction of periodic timers and suspending Emacs 22.1) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvwslkzpun.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=300@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=jbw@rzlab.ucr.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.