GNU bug report logs -
#38807
[Feature request]: Support lisp workers like web workers.
Previous Next
Reported by: HaiJun Zhang <netjune <at> outlook.com>
Date: Mon, 30 Dec 2019 05:29:02 UTC
Severity: wishlist
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #203 received at 38807 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii writes:
> Since the user waits for this job to finish anyway, why does it help
> to run some of this processing in a separate thread?
The user might not want to wait for the completion but he/she might want
to continue to type while the parsing is taking place. The effect is
that the typing feels slugish. IME with latest native json parsing this
is no longer the case for lsp-mode.
With my limited understanding of emacs internals I see 2 potential
solutions to allow writing of "lisp workers".
1. Start second(or multiple) elisp interpreter in the emacs process
which has thread local copy of all of the global data(buffers, data
allocation, etc). It may or may not have a gui attached to it. In
addition to that, introduce primitives for moving elisp datastructure
from the background thread to the main UI thread and vice versa
eventually by coping the original structure to avoid bugs.
2. Make the functions that create elisp datastructures threadsafe(or
some sane subset) and expose them to the dynamic modules.
Thanks,
Ivan
This bug report was last modified 3 years and 63 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.