emacs-devel
[Top][All Lists]
Advanced

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

Re: Info: No GIL Multithreading strat for Python


From: Eli Zaretskii
Subject: Re: Info: No GIL Multithreading strat for Python
Date: Mon, 04 Mar 2024 14:44:10 +0200

> From: Arthur Miller <arthur.miller@live.com>
> Cc: emacs-devel@gnu.org
> Date: Mon, 04 Mar 2024 13:19:15 +0100
> 
> >> Anyway; Python Intepretter and Emacs are not the same, but there are some
> >> important similarities and similar problems. What they are talking there 
> >> might
> >> be an interesting multithreading strategy for Emacs as well. They have 
> >> similar
> >> problem with the shared state.
> >
> > No, the problems in Emacs are much harder, because the shared state
> > exists independently of the programs written in Emacs Lisp, and
> 
> How is shared state in Emacs independent of Emacs Lisp programs?

Because Emacs Lisp programs run inside Emacs, and Emacs itself has a
very large global shared state.  The tiniest ELisp program inherits
that state whether it wants it or not.  By contrast, a Python program
has only the state that the programmer programmed.

> Lisp programs
> can modify, introduce and remove shared state, and that is what they do all 
> the
> time; and so can Python programs. I am not sure I following; honestly, I am
> probably thinking of something different than you there.

In Emacs, we have the current buffer and the selected window, and all
of the global variables and symbols that exist in Emacs from the
get-go.  A Lisp program cannot remove that state.



reply via email to

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