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: Michael Heerdegen
Subject: Re: Running processing functions in background
Date: Sun, 22 Nov 2020 15:06:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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.

Michael.



reply via email to

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