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: Thu, 3 Dec 2020 12:08:33 +0300 [thread overview]
Message-ID: <X8irEeEthogEht39@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 that.
I could make something so that mailing list is sent from Emacs with
(run-with-idle-timer SECS REPEAT FUNCTION &rest ARGS) and that not
many emails are sent, for example 5 instead 500 at once.
prev parent reply other threads:[~2020-12-03 9:08 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
2020-11-25 14:20 ` Michael Heerdegen
2020-12-03 9:08 ` Jean Louis [this message]
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=X8irEeEthogEht39@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.