From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Info: No GIL Multithreading strat for Python Date: Mon, 04 Mar 2024 14:44:10 +0200 Message-ID: <86r0gqmajp.fsf@gnu.org> References: <86bk7vnwbi.fsf@gnu.org> <86zfvfm7qr.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10574"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 04 13:45:16 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rh7gx-0002de-Lu for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Mar 2024 13:45:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rh7gF-0003fc-8Q; Mon, 04 Mar 2024 07:44:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh7gB-0003cq-K4 for emacs-devel@gnu.org; Mon, 04 Mar 2024 07:44:28 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh7gB-0003Bm-43; Mon, 04 Mar 2024 07:44:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=K1ifvbBtpcsb8X5b79av0Ng88/EO/lmFh7tOXE+ZC0I=; b=IfcKWALaou+x U5ckKMvodNqL5QszIWn8WfoaWoL40lvwAIrsHrQgD0QAMTa006kFoYnKpQcdt5Nx4KQTJdfhB2LN1 ncJs1wgcTj27rWNUi+VOZMu8+79gR1DXpWS/cRJHoht0gJmox59wY24SEH/T0l5lfsWFH4j9ItAw8 cMOTkfryzy04H/+/6pS74/bjfwRip+8I2e49azbsOJUnC3BiewklojQ/ttd7SvqpY0npNa8Z3X0xC KBIMWqBopx6yCWCXZh7qnpi3bSQ7Rvzhx2coF5oRihZ/fIRQZ/o1Gu0VytM7RkhD9nenuzp0caBP4 BKz9D57qBVnsS69IsOLZNQ==; In-Reply-To: (message from Arthur Miller on Mon, 04 Mar 2024 13:19:15 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316790 Archived-At: > From: Arthur Miller > 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.