unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Vitalie Spinu <spinuvit@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Proposal for a new mechanism for delayed stuff
Date: Thu, 27 Dec 2012 10:40:22 +0100	[thread overview]
Message-ID: <87a9sz96k9.fsf@gmail.com> (raw)
In-Reply-To: <87pq1y46ao.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 25 Dec 2012 14:20:31 +0100")

  >> Lars Ingebrigtsen <larsi@gnus.org>
  >> 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   



  parent reply	other threads:[~2012-12-27  9:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-25 13:20 Proposal for a new mechanism for delayed stuff Lars Ingebrigtsen
2012-12-25 13:52 ` Xue Fuqiao
2012-12-25 19:57 ` Karl Fogel
2012-12-26 14:08 ` Ted Zlatanov
2012-12-27  4:08   ` Stephen J. Turnbull
2012-12-27 10:49     ` Achim Gratz
2012-12-27 14:43       ` Stephen J. Turnbull
2012-12-27  9:40 ` Vitalie Spinu [this message]
2012-12-27 14:01   ` Lars Ingebrigtsen
2012-12-29  6:30 ` Stefan Monnier
2012-12-31 14:09   ` Lars Magne Ingebrigtsen
2013-01-03 16:47     ` Stefan Monnier
2013-01-03 23:34       ` Lars Magne Ingebrigtsen
2013-01-04  1:56         ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87a9sz96k9.fsf@gmail.com \
    --to=spinuvit@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).