From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Nested sit-for's Date: Fri, 18 Aug 2006 11:47:56 -0400 Message-ID: References: <87y7tp90i1.fsf@stupidchicken.com> <87d5azjvcz.fsf@furball.mit.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1155916174 20215 80.91.229.2 (18 Aug 2006 15:49:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Aug 2006 15:49:34 +0000 (UTC) Cc: emacs-devel@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 18 17:49:32 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GE6b7-0001HG-H0 for ged-emacs-devel@m.gmane.org; Fri, 18 Aug 2006 17:49:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GE6b6-0007N3-GX for ged-emacs-devel@m.gmane.org; Fri, 18 Aug 2006 11:49:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GE6Zm-00066w-H7 for emacs-devel@gnu.org; Fri, 18 Aug 2006 11:48:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GE6Zj-000649-9x for emacs-devel@gnu.org; Fri, 18 Aug 2006 11:48:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GE6Zi-00063o-4y for emacs-devel@gnu.org; Fri, 18 Aug 2006 11:47:59 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GE6gR-0007Fq-B2 for emacs-devel@gnu.org; Fri, 18 Aug 2006 11:54:55 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GE6Zg-00005M-9P; Fri, 18 Aug 2006 11:47:56 -0400 Original-To: Chong Yidong In-reply-to: <87d5azjvcz.fsf@furball.mit.edu> (message from Chong Yidong on Thu, 17 Aug 2006 10:21:48 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58489 Archived-At: In the case where (load-average) is too high, the idle timer may not get control back until up to 30 seconds later: We certainly don't want this timer function, as currently written, to run from within another timer. I just tried writing the code to eliminate this loop and make the timer reschedule itself. The only hard part was that there is no way for an idle timer to arrange to run something after a few seconds more of idleness. To enable that, I added a function current-idle-time. With that, it is easy to write the code for jit-lock to avoid looping. Which means we can simply say that timer functions should not call sit-for. I think some timer functions will still need to call accept-process-output, but we can say they are supposed to call it in the way that doesn't run timers. Does anyone think that will cause a problem?