From: gsstark@MIT.EDU (Greg Stark)
Cc: ratinox@ccs.neu.edu, ding@ifi.uio.no
Subject: Re: Getting articles asynchronously.....
Date: 28 Dec 1995 08:35:12 -0500 [thread overview]
Message-ID: <ycqvin18g6n.fsf@fierce-bad-rabbit.MIT.EDU> (raw)
In-Reply-To: "Mark W. Eichin"'s message of Wed, 27 Dec 1995 23:53:52 -0500
Actually, I was just in the process of writing a back end, and it occurred to
me I was taking an essentially asynchronous operation (interacting with a
subprocess) and serializing it.
This is an enormous lose, an existing interface allows users to start an
operation and go work on other things; it does this by putting most of the
work in the filter function.
The basic design to make Gnus do this would be to split each of the backend
interface functions into two steps. Gnus would call a normal looking backend
function, but would pass a couple extra arguments. One of the extra arguments
would be a function the backend function would call when it finshed its
processing. I think it would also be useful to pass a nonce along as well and
pass it back to Gnus.
I would have said this would be very difficult to get right, but I also would
have said that about a lot of existing Gnus features. And in my opinion this
is the key feature that would make Gnus a lot more useful. I do a lot of
things in my Emacs and it frustrates me when it freezes for more than a few
seconds.
In fact, I think the least robust part of my backend is going to be the
joining of the synchronous backend interface and the asynchronous sub-process.
It would be easier to implement robustly if both were asynchronous.
greg
In case I wasn't clear here's an example of what I mean:
(defun nnchoke-retrieve-headers (articles call-back nonce &optional g s f)
(start-process foo ...)
(set-process-filter foo 'nnchoke-retrieve-headers-do-work)
'in-progress)
(defun nnchoke-retrieve-headers-do-work (p s)
...
process a lot of data
but without blocking Emacs
...
(funcall call-back nonce 'nov))
obviously some parts of the api need to be fixed to handle this,
The nntp-server-buffer must either be passed down or dynamically bound.
The concept of a ``current group'' should probably be given up.
things like that, but nothing terribly major.
(except that i don't think the above example works because of the scoping of
call-back and nonce, hmm)
greg
next prev parent reply other threads:[~1995-12-28 13:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-12-26 9:16 Patrick Audley
1995-12-26 14:18 ` Stainless Steel Rat
1995-12-26 20:57 ` Patrick Audley
1995-12-26 23:34 ` Stainless Steel Rat
1995-12-27 1:18 ` Felix Lee
1996-01-03 9:20 ` Lars Magne Ingebrigtsen
1995-12-28 4:53 ` Mark W. Eichin
1995-12-28 13:35 ` Greg Stark [this message]
1996-01-15 9:15 ` Greg Stark
1996-01-15 20:36 ` Steven L Baur
1996-01-16 10:34 ` Ketil Z Malde
1996-01-16 11:05 ` Greg Stark
1996-01-16 13:05 ` Massimo Campostrini
[not found] ` <zqbn99ny@totally-fudged-out-message-id>
1996-01-17 2:51 ` Lars Magne Ingebrigtsen
1996-01-17 2:51 ` Lars Magne Ingebrigtsen
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=ycqvin18g6n.fsf@fierce-bad-rabbit.MIT.EDU \
--to=gsstark@mit.edu \
--cc=ding@ifi.uio.no \
--cc=ratinox@ccs.neu.edu \
/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).