Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: is there a possibility for gnus to download data without blocking?
Date: Thu, 20 Aug 2020 21:39:28 -0700	[thread overview]
Message-ID: <87imdcvchr.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <86y2m8hccw.fsf@protonmail.com>

Wayne Harris <wharris1@protonmail.com> writes:

> Is there a possibility for gnus to download data without blocking?
> Wouldn't it be nice to be able to keep using EMACS while Gnus is
> downloading?
>
> Is it a limitation of EMACS itself?  If so, is there any plans for
> supporting such things in the future?  Wouldn't it be nice?

It would be lovely! There are a few issues: Emacs is single-threaded,
though it has the ability to continue execution while waiting on IO from
an external process. So theoretically we can already "download data
without blocking". In fact, Gnus already does this in a limited way:
when you hit "g", it starts an async external process for each of your
servers (each that involves an external process, anyway), then polls
each one until they're all done, and then continues with updating its
state.

That means there's really only a benefit when you have multiple servers
that can overlap their IO, and you're still going to wait as long as the
longest server takes.

In theory we could have a Gnus that fires off all the servers and then
returns control to the user immediately, but that would involve handling
out-of-band returns as they came in from the servers, and Gnus would
have to be structured very differently than it is now to manage that.

Eric



  reply	other threads:[~2020-08-21  4:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21  4:06 Wayne Harris
2020-08-21  4:39 ` Eric Abrahamsen [this message]
2020-08-21 10:31   ` dick.r.chiang
2020-08-21 17:42     ` Eric Abrahamsen
2020-08-21 14:18   ` Wayne Harris
2020-08-21 17:16     ` Eric Abrahamsen
2020-08-21 20:30       ` Wayne Harris
2020-08-22  2:27         ` Wayne Harris
2020-08-22 10:45           ` dick.r.chiang
2020-08-22 15:52             ` Wayne Harris
2020-08-22 16:11               ` dick.r.chiang
2020-08-22 17:07                 ` Eric Abrahamsen

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=87imdcvchr.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    /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).