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.tangents Subject: Re: Shrinking the C core Date: Fri, 15 Sep 2023 21:39:58 +0300 Message-ID: <83fs3fjn5t.fsf@gnu.org> References: <83r0n0lwm7.fsf@gnu.org> <877core4zp.fsf@dataswamp.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4677"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-tangents@gnu.org To: Emanuel Berg Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Fri Sep 15 20:40:28 2023 Return-path: Envelope-to: get-emacs-tangents@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 1qhDjw-00011B-An for get-emacs-tangents@m.gmane-mx.org; Fri, 15 Sep 2023 20:40:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhDja-00038N-JS; Fri, 15 Sep 2023 14:40:06 -0400 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 1qhDjZ-000386-K9 for emacs-tangents@gnu.org; Fri, 15 Sep 2023 14:40:05 -0400 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 1qhDjY-0002uU-8m; Fri, 15 Sep 2023 14:40:04 -0400 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=lfiC7WMYFxLou46dtgxA2+AopzqbVQmfyeCCqC7IyF4=; b=eqlczEHAod8G 0nK1oDqzeGn5KP+o3HsIzBYSBd8aZswzZhlepNO5aj9ry4zcAkT0yPfo9uK1sl1Nhz3uPYlZF7sFg NIGteNdtlhJaVz8+0QsWMlhA+CC65CW9Ha8oBc39kBzp+hQbN2Qwz5ZDZP1ZinoNscqUpoEosfr/G Q1rOb8jGG2l4IOvZqiwhh0oB3S9tNj5+/X78f4yX3nDHFkmVUvnWLqG2d8krZGkl6+2AD12YKWn5k KFDyJ8M4ZxrQ4knIAVhKVL1cSQj4PIgDo+ym4Cwaf5UbMMvOSjOFX+3QXxGf9Ec7HFLsa1hqZpvoO hzc2LN47draA56vpY4pnAg==; In-Reply-To: <877core4zp.fsf@dataswamp.org> (message from Emanuel Berg on Fri, 15 Sep 2023 19:11:22 +0200) X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Original-Sender: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.tangents:1094 Archived-At: > From: Emanuel Berg > Date: Fri, 15 Sep 2023 19:11:22 +0200 > > Eli Zaretskii wrote: > > >> I think the biggest problem with uncooperative > >> multi-threading in Emacs is that Emacs has so much global > >> state. As a consequence, it's unsafe to let two threads use > >> anything in the C code in parallel. > > > > Indeed, that's the main problem. Just adding threads to Lisp > > is easy. > > Is there a part that is safe to access in parallel? No. The global state cannot be possibly accessed in parallel from two or more threads. > If not, or for the part that is unsafe, where is > synchronization of access to be done, in Lisp or in C? Both.