unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Running processing functions in background
Date: Sun, 22 Nov 2020 17:23:47 +0300	[thread overview]
Message-ID: <X7p0c43G40Zh95vB@protected.rcdrun.com> (raw)
In-Reply-To: <873611iiyw.fsf@web.de>

* Michael Heerdegen <michael_heerdegen@web.de> [2020-11-22 17:07]:
> Jean Louis <bugs@gnu.support> writes:
> 
> > I have some functions that are blocking Emacs interface
> > while they are processing database in background. Functions
> > are not interactive. Output goes to dedicated buffer for
> > later human review. And I prefer not to use external async
> > package.
> >
> > I would like to have responsive Emacs while running and the
> > background function I think to intertwine with
> > `run-with-idle-timer' as function is sending emails to the
> > mailing list and there is no rush in doing so.
> >
> > The `make-thread' did work well but interface remain not so
> > responsive, it slows down.
> 
> Is that work a bug report?  Why does that happen?
> 
> > Is there some other approach when using only Emacs built-in
> > functions?
> 
> The only alternative I know are generators and streams; they can be used
> together with `while-no-input' or `throw-on-input' to implement
> interruptable calculations if you write your program in an appropriate
> style, but in my experience it is quite a fiddle.
> 
> emacs-async is not so bad if it's suitable for ones use case.

Thank you for references.



  reply	other threads:[~2020-11-22 14:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 11:53 Running processing functions in background Jean Louis
2020-11-22 14:06 ` Michael Heerdegen
2020-11-22 14:23   ` Jean Louis [this message]
2020-11-25 14:20   ` Michael Heerdegen
2020-12-03  9:08   ` Jean Louis

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=X7p0c43G40Zh95vB@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).