help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running processing functions in background


From: Jean Louis
Subject: Re: Running processing functions in background
Date: Thu, 3 Dec 2020 12:08:33 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]