From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: Proposal for a new mechanism for delayed stuff Date: Thu, 27 Dec 2012 10:40:22 +0100 Organization: EUR Message-ID: <87a9sz96k9.fsf@gmail.com> References: <87pq1y46ao.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356601237 24903 80.91.229.3 (27 Dec 2012 09:40:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Dec 2012 09:40:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 27 10:40:53 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1To9xJ-00044l-T4 for ged-emacs-devel@m.gmane.org; Thu, 27 Dec 2012 10:40:50 +0100 Original-Received: from localhost ([::1]:44032 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1To9x5-0006F3-Dr for ged-emacs-devel@m.gmane.org; Thu, 27 Dec 2012 04:40:35 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1To9x0-00067M-2j for emacs-devel@gnu.org; Thu, 27 Dec 2012 04:40:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1To9wv-0006a1-Go for emacs-devel@gnu.org; Thu, 27 Dec 2012 04:40:30 -0500 Original-Received: from mail-wg0-f50.google.com ([74.125.82.50]:42373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1To9wv-0006Zt-8p for emacs-devel@gnu.org; Thu, 27 Dec 2012 04:40:25 -0500 Original-Received: by mail-wg0-f50.google.com with SMTP id es5so4334523wgb.5 for ; Thu, 27 Dec 2012 01:40:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=jGk7Q3OzS5bQLpFKfNSAAQtfJ7LEzFSha1/u2CH0XN0=; b=NHp+izRtqnJReHptAnEg6qxNXffKEoHMr7yxUYkmZJRST3MKA/0DeJ9c/ep4P559Qz BNFLzAyqwtjLWFw7Mep3qRX8WEbdtshfBJWiSLmaR0v/yCW7c/TQKWZ1izlzLWjAuVbD 3iX3knACu+8zgTcsPmA5dLWw6e/XrF1g+IA9eVRCBiNUCL23m0rKNa7tZkLRYw8ogCph EylkgeCE4ZO+bzUfV1DLgroZbbUnUpumL/29+2NA5LptvYrsjL/VyC/tnBjs3sCzlYdJ ngrN/utkBd9C9WuYwY4hMNT57J41gy0Rm9353FHWPbQmMoqM0CEWGj52iVnvmh14BtxC goWw== X-Received: by 10.194.19.10 with SMTP id a10mr47783865wje.45.1356601224386; Thu, 27 Dec 2012 01:40:24 -0800 (PST) Original-Received: from localhost (i108036.upc-i.chello.nl. [62.195.108.36]) by mx.google.com with ESMTPS id s16sm52315373wii.0.2012.12.27.01.40.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Dec 2012 01:40:23 -0800 (PST) In-Reply-To: <87pq1y46ao.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 25 Dec 2012 14:20:31 +0100") User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.2.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.82.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155931 Archived-At: >> Lars Ingebrigtsen >> on Tue, 25 Dec 2012 14:20:31 +0100 wrote: [...] > (with-timeout-forms > (progn > (bla) > (bla)) > (1.5 (message "This is sure taking a lot of time...")) > (10 (message "This is sure taking forever!"))) (bla) (bla) are asynchronous forms, right? I am probably missing something, but there should be a callback, otherwise how do you know when (bla) is finished? Should negative numbers signify a repeated task? (with-timeout-forms (progn ... ) (-1 (do-something-every-second)) ) Then you can pass an explicit callback: (with-timeout-forms (progn ... (bla bla) ) (-.1 (if-job-is-finished-break-timeout-loop)) ) Vitalie