Gnus development mailing list
 help / color / mirror / Atom feed
From: Ken Raeburn <raeburn@cygnus.com>
Subject: Re: asynchronous backends
Date: 15 Apr 1997 21:23:17 -0400	[thread overview]
Message-ID: <tx1iv1n222i.fsf@cygnus.com> (raw)
In-Reply-To: Stainless Steel Rat's message of 14 Apr 1997 16:52:57 -0400

Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> >>>>> "GS" == Greg Stark <gsstark@MIT.EDU> writes:
> GS> Namely, it's nice and all that nntp can pre-fetch articles before i ask
> GS> for them, but that's not the really cool idea. The really cool idea is
> GS> that when i enter a new group and there are four gazillion new articles
> GS> and i really want to read them all, while Gnus is fetching the NNTP
> GS> scan it can let me go back to editing my files (edit files? in emacs?)
> 
> Emacs cannot do this, not the way you want.  Gnus' asynchronous prefetch is
> not really completely asynchronous.  It uses a feature called process
> filters.  When data from a process arrives it causes Emacs to invoke the
> process filter function associated with that process' output stream.  But
> Emacs can only do this if it is not already doing something else.  Why?

In the case Greg is talking about, the backend doesn't require a lot
of processing time; it's waiting for a slow subprocess.  The
subprocess isn't cpu-intensive, either; it's waiting for lots of
round-trips to lots of network servers.  So doing random editing while
waiting works just fine.  At least, it does in the other, asynchronous
emacs front-end to the same package.  (There was some problem with
emacs getting confused about which buffer an input event should get
delivered to, but I think that's been fixed.)

This isn't the only case where emacs may have to just sit and wait.
Consider too what happens if your news server is on the far side of a
slow link.  I get this if I'm connecting by modem from home, or if I'm
travelling and dialing up or using a local net provider.  An nntp
server can be slow sending headers or the active file.  A pop server
can be slow sending mail.

An asynch interface would be great, but I'd settle for more
parallelism in the gnus-related tasks.

> Because the lisp interpreter is not threaded.  It can only do one thing at
> a time.

This "just" means the multitasking has to be done at the application
(gnus elisp) level.

(I will not suggest multithreading elisp again.  I will not suggest
multithreading elisp again.  I will not ....)

Ken


  reply	other threads:[~1997-04-16  1:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-14 13:16 Greg Stark
1997-04-14 20:52 ` Stainless Steel Rat
1997-04-16  1:23   ` Ken Raeburn [this message]
1997-04-16  3:21     ` Stainless Steel Rat
1997-04-20 20:08 ` Lars Magne Ingebrigtsen
1997-04-17 13:12 Greg Stark
1997-04-17 20:35 ` Stainless Steel Rat

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

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

  git send-email \
    --in-reply-to=tx1iv1n222i.fsf@cygnus.com \
    --to=raeburn@cygnus.com \
    /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.
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).