[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal for a new mechanism for delayed stuff

From: Karl Fogel
Subject: Re: Proposal for a new mechanism for delayed stuff
Date: Tue, 25 Dec 2012 13:57:35 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Lars Ingebrigtsen <address@hidden> writes:
>Gnus does a lot of stuff that it doesn't really know how long it'll take
>to do.  For instance, connecting to a mail server, and rendering
>complex HTML.
>If Gnus were to output "Connecting to foo", "sending retrieval
>commands", "waiting for foo to finish outputting" (which are usually
>done asynchronously, intermingled between many servers), Gnus would spew
>an inordinate number of messages.
>And sometimes the user should know what's taking so long, so that the
>user can decide what to do about it.
>So the ideal would be if we could say "display a message if things take
>too long".
>The idea I had yesterday was to make this totally general:
>   (progn
>     (bla)
>     (bla))
>  (1.5 (message "This is sure taking a lot of time..."))
>  (10 (message "This is sure taking forever!")))
>A la condition-case and stuff, although here we have forms that are
>run if the main form takes too long.  So after 1.5 seconds we trigger
>the first, and after 10 we trigger the second.
>And perhaps it would also be possible to have a special thing in the
>timeout forms that would conclude the entire main form?  Like `return'
>or something.
>So it's like `with-timeout', only that it doesn't end executing the
>body.  And it would hopefully be possible to implement it such a way
>that a looping body form would also be "pre-emptible".  

I think that's a great generalization idea.  And `with-timeout' could
then be (re)implemented using `with-timeout-forms', presumably.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]