Gnus development mailing list
 help / color / mirror / Atom feed
* Greg's Perennial Plea For an Asynchronous Backend Interface
@ 2001-01-03  6:23 Greg Stark
  2001-01-03 15:55 ` Kai Großjohann
  2001-01-04 10:40 ` Steinar Bang
  0 siblings, 2 replies; 6+ messages in thread
From: Greg Stark @ 2001-01-03  6:23 UTC (permalink / raw)



So I go through this about every other year or so, I think this is my third
time. Periodically I get really frustrated that some gnus has tied up my emacs
doing some long network operation like downloading a few thousand news
headers, or expunging an imap mailbox, etc. For someone who lives entirely
within Emacs such things can be terribly frustrating. And it's completely
unnecessary.

No you don't need a threaded Emacs. 

Imagine if could pull down the complete summary of some huge newsgroup to do
searches while editing your files and composing replies in another group.

No you do *not* need a threaded Emacs. Really.

Imagine if when starting Gnus it initiated the check of the active file of all
20 slow news servers simultaneously and let you read from your main server
until they all respond or time out five minutes later.

No you do *not* need a threaded Emacs. Go away.

All you need is an interface between Gnus and the backends that allows Gnus to
pass a callback with a closure to the backend when an asynchronous call is
permitted. And of course you want to do this in a backwards compatible way, so
if the backend doesn't implement the asynchronous call Gnus just calls the
normal backend function. 

The backend of course needs to be written cleverly to make this possible. The
good news is that many of them already are. Because it's the most memory
efficient way to code process handling code in modern Emacsen many of the
backends implement their process handling code using after-change-hooks hooks
on the process buffer. These hooks get called asynchronously when the response
comes in, all they have to do is arrange to call Gnus' callback.

If anyone still doesn't believe me that these things do not require a threaded
Emacs consider this: I've already done it, back in 1996 when I originally
brought this up. 

My implementation uses a short cut(*) that wouldn't make sense in more than one
backend at a time. But the concept is proven. Emacs is perfectly responsive
while doing a large slow network operation. I can edit, compose, do all the
million other things I do within Emacs every day without getting blocked by
Gnus.

Doing it properly requires the new interface between backends and Gnus. And it
require Gnus be aware of when it's using the asynchronous interface to avoid
conflicts. But it would be much more powerful than my kludge.

(*) In case anyone's curious, the magic words are: recursive-edit :)

-- 
greg




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

end of thread, other threads:[~2001-01-05 16:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-03  6:23 Greg's Perennial Plea For an Asynchronous Backend Interface Greg Stark
2001-01-03 15:55 ` Kai Großjohann
2001-01-04  1:26   ` Lloyd Zusman
2001-01-04 10:40 ` Steinar Bang
2001-01-05 10:30   ` Simon Josefsson
2001-01-05 16:41     ` Steinar Bang

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 NNTP newsgroup(s).