From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Nested sit-for's Date: Wed, 16 Aug 2006 10:14:47 +0200 Message-ID: References: <87y7tp90i1.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1155716214 28697 80.91.229.2 (16 Aug 2006 08:16:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Aug 2006 08:16:54 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 16 10:16:49 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 1GDGZx-0003lP-Qk for ged-emacs-devel@m.gmane.org; Wed, 16 Aug 2006 10:16:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDGZx-0002pf-5p for ged-emacs-devel@m.gmane.org; Wed, 16 Aug 2006 04:16:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GDGZY-0002kF-Vt for emacs-devel@gnu.org; Wed, 16 Aug 2006 04:16:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GDGZT-0002c6-AR for emacs-devel@gnu.org; Wed, 16 Aug 2006 04:16:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDGZS-0002az-Ad for emacs-devel@gnu.org; Wed, 16 Aug 2006 04:16:14 -0400 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GDGff-0003EE-9D for emacs-devel@gnu.org; Wed, 16 Aug 2006 04:22:39 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepb.post.tele.dk (Postfix) with SMTP id 78A1DA50072; Wed, 16 Aug 2006 10:16:05 +0200 (CEST) Original-To: Chong Yidong In-Reply-To: <87y7tp90i1.fsf@stupidchicken.com> (Chong Yidong's message of "Tue, 15 Aug 2006 17:01:42 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:58436 Archived-At: Chong Yidong writes: >> What about the change that we discussed where nested sit-for calls >> should not wait longer than any of the outer calls?? > > I haven't had a chance to spend much time on this project. One > problem is that I haven't managed to find a simple test case that > clearly demonstrates the old behavior is broken. > Try this evaluating this: (defun st1 () (with-current-buffer (get-buffer-create "*st1*") (goto-char (point-max)) (insert "<") (sit-for 30) (insert ">"))) (run-with-timer 1 2 'st1) (progn (message "sit-for...") (sit-for 5) (message "sit-for...done")) Now, the sit-for...done message is shown after 30-35 seconds, not after 5 seconds... [repeat the last progn if you don't see the effect immediately] The call to sit-for in the timer is probably "bad practice", but it could just as well have happened in a process filter or some other async handler. -- Kim F. Storm http://www.cua.dk