all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Info: No GIL Multithreading strat for Python
Date: Mon, 04 Mar 2024 16:55:17 +0100	[thread overview]
Message-ID: <DU2PR02MB10109ADB1A490EF9B3B1E21C196232@DU2PR02MB10109.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <86r0gqmajp.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 04 Mar 2024 07:44:27 -0500")

Eli Zaretskii <eliz@gnu.org> writes:

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

Yes, but every interpretter and runtime has some state exposed to applicaiton
programs and shared with them. Otherwise we are speaking about assembly or C at
best. I agree that Python is much smaller and cleaner, then Emacs. But I think
the priniple with the shared state is still similar.

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

Of course. But buffers and other objects are built-in parts of the
implementation. Every runtime has some parts that are not exposed to applicaiton
programs, and can't be altered.

Emacs adds many special-purpose objects to its Lisp machine, I agree. But that
is rather volume. The solution they are trying seems to address exactly that
problem: shared objects, so principally it might be something for the Emacs too;
but practically I don't know.




  reply	other threads:[~2024-03-04 15:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-03 11:50 Info: No GIL Multithreading strat for Python Arthur Miller
2024-03-03 15:56 ` Eli Zaretskii
2024-03-03 19:01   ` Arthur Miller
2024-03-03 19:32     ` Eli Zaretskii
2024-03-04 12:19       ` Arthur Miller
2024-03-04 12:44         ` Eli Zaretskii
2024-03-04 15:55           ` Arthur Miller [this message]
2024-03-04 16:30           ` Konstantin Kharlamov
2024-03-04 16:50             ` Eli Zaretskii
2024-03-05  0:44               ` chad
2024-03-05  0:44               ` chad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DU2PR02MB10109ADB1A490EF9B3B1E21C196232@DU2PR02MB10109.eurprd02.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.