unofficial mirror of emacs-devel@gnu.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: Sun, 03 Mar 2024 20:01:06 +0100	[thread overview]
Message-ID: <DU2PR02MB10109095028CFD45E5AA2830E965C2@DU2PR02MB10109.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <86bk7vnwbi.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 03 Mar 2024 10:56:20 -0500")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Date: Sun, 03 Mar 2024 12:50:18 +0100
>> 
>> 
>> I just stumbled over an intersting presentation of a multithreading experiment
>> for a "no-gil" Python, with relatively well-explained strategy they use,
>> problems they face and what it offers:
>> 
>> https://www.youtube.com/watch?v=rImAmkS2ySE&t=2s
>> 
>> The presentation is about ~ ½ year old, I have no idea what is the status and
>> how well it works. But some of what they discuss is perhaps of the interest for
>> emacs devs.
>
> Python is a programming language, where the programmers are
> responsible for what the parallel programs they write do and how do
> they cope with the various dangers of concurrency.  If the program
> crashes, the programmer has only him/herself to blame.

I am not sure what you are trying to say? Python is not Elisp; Elisp is not
Python, and Python interpretter is not Emacs, and Emacs is not Python
interpretter. I think it is self-evident. Sure, nobody said they are the same?

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.

> By contrast, Emacs is a program that lets users process text in
> various scenarios, where users expect Emacs to react gracefully to
> errors.  Emacs the program has a very large global state that doesn't
> work well with any concurrency, and which any programmer will keep as

Yes, we all know that, and that is what that presentation was about; that is why
I have hinted abou it.

> far from as possible.  If Emacs crashes, users blame Emacs, not the
> Lisp they wrote.

Mnjah; I think you are little bit unjust to your users here :). I think that
people do understand when they write bad code and crash Emacs.

> So there's a large difference, and therefore not every technique used

Naturally, there is a difference between a text editor and an interpretter; but
Emacs happens to be both at the same time; and the interpretter part is rather
similar to Python.

> by a programming language can be used by Emacs to achieve similar
> goals.

Of course; and nobody said that you pick any random strat for some programming
language implementation and apply to Emacs.

However, what they are trying to solve there, is potentially very similar to
what we have in Emacs too.

Anyway, just information sharing.




  reply	other threads:[~2024-03-03 19:01 UTC|newest]

Thread overview: 10+ 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 [this message]
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
2024-03-04 16:30           ` Konstantin Kharlamov
2024-03-04 16:50             ` Eli Zaretskii
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=DU2PR02MB10109095028CFD45E5AA2830E965C2@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).