unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Proposal for a new mechanism for delayed stuff
@ 2012-12-25 13:20 Lars Ingebrigtsen
  2012-12-25 13:52 ` Xue Fuqiao
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-25 13:20 UTC (permalink / raw)
  To: emacs-devel

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:

(with-timeout-forms
   (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".  

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-01-04  1:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).