From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#300: strange interaction of periodic timers and suspending Emacs 22.1 Date: Fri, 23 May 2008 17:17:31 -0400 Message-ID: References: <86tzgq3ymq.fsf@macs.hw.ac.uk> Reply-To: Stefan Monnier , 300@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1211578442 28292 80.91.229.12 (23 May 2008 21:34:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 May 2008 21:34:02 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, 300@emacsbugs.donarmstrong.com To: Joe Wells Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 23 23:34:39 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JzetR-0001rg-Uz for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 May 2008 23:33:42 +0200 Original-Received: from localhost ([127.0.0.1]:36717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jzesh-0001dK-A6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 May 2008 17:32:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jzerv-0000gg-Ux for bug-gnu-emacs@gnu.org; Fri, 23 May 2008 17:32:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jzeru-0000dz-IQ for bug-gnu-emacs@gnu.org; Fri, 23 May 2008 17:32:06 -0400 Original-Received: from [199.232.76.173] (port=37477 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jzeru-0000do-3g for bug-gnu-emacs@gnu.org; Fri, 23 May 2008 17:32:06 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:54100) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jzert-0004jO-IY for bug-gnu-emacs@gnu.org; Fri, 23 May 2008 17:32:06 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4NLVqbe002618; Fri, 23 May 2008 14:32:03 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m4NLP6Qm000462; Fri, 23 May 2008 14:25:06 -0700 X-Loop: don@donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 23 May 2008 21:25:06 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 300 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 300-submit@emacsbugs.donarmstrong.com id=B300.121157746531541 (code B ref 300); Fri, 23 May 2008 21:25:06 +0000 Original-Received: (at 300) by emacsbugs.donarmstrong.com; 23 May 2008 21:17:45 +0000 Original-Received: from mercure.iro.umontreal.ca (mercure.iro.umontreal.ca [132.204.24.67]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4NLHgEu031533 for <300@emacsbugs.donarmstrong.com>; Fri, 23 May 2008 14:17:43 -0700 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id C13A32CFA5C; Fri, 23 May 2008 17:17:41 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id A2AD93FE0; Fri, 23 May 2008 17:17:31 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 7214441BEC; Fri, 23 May 2008 17:17:31 -0400 (EDT) In-Reply-To: <86tzgq3ymq.fsf@macs.hw.ac.uk> (Joe Wells's message of "Thu, 22 May 2008 20:52:13 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Fri, 23 May 2008 17:32:06 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:18113 Archived-At: > 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