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

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

bug#38807: [Feature request]: Support lisp workers like web workers.


From: Eli Zaretskii
Subject: bug#38807: [Feature request]: Support lisp workers like web workers.
Date: Sat, 21 Mar 2020 10:16:28 +0200

> Date: Sat, 21 Mar 2020 10:24:37 +0800
> From: HaiJun Zhang <netjune@outlook.com>
> Cc: michael.albinus@gmx.de, 38807@debbugs.gnu.org
> 
> I known module code can call emacs functions. But is it true for threads in 
> module?

Since the Lisp interpreter is non-reentrant, this is not possible.

> See this: 
> https://github.com/emacs-lsp/lsp-mode/issues/676#issuecomment-476700911
> 
> That means if a native-code thread is to be run in parallel with the UI 
> thread, it can never access an Env. 

Yes, but so what?  You can still do work in the module threads, then
send the accumulated results to emacs from the main thread.

Again, this is all too abstract.  A useful discussion would have many
more details regarding the job that needs to be done and the
bottle-necks that need to be distributed to threads running in
parallel.





reply via email to

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