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: Emacs design and architecture. How about copy-on-write? Date: Mon, 18 Sep 2023 18:04:15 +0300 Message-ID: <83msxjed5c.fsf@gnu.org> References: <83edizjn0v.fsf@gnu.org> <0518f65b-1dd1-6923-8497-da4d3aeac631@gutov.dev> <87sf7fc7kd.fsf@dataswamp.org> <834jjuk68t.fsf@gnu.org> <87cyyhc7uu.fsf@dataswamp.org> <83ttrsg9nx.fsf@gnu.org> <83h6nrg4eg.fsf@gnu.org> <83v8c7elan.fsf@gnu.org> <87h6nrwqvq.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6541"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 18 17:05:58 2023 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 1qiFoz-0001M0-29 for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Sep 2023 17:05:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiFnT-0008TK-UB; Mon, 18 Sep 2023 11:04:24 -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 1qiFnN-0008Ou-R4 for emacs-devel@gnu.org; Mon, 18 Sep 2023 11:04:19 -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 1qiFnM-0007CS-Ah; Mon, 18 Sep 2023 11:04:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=A23q+9lt1VlIvPl7/eE6JlGWp96SxkBslXvunc5voko=; b=lANHvxcRhsXV8djaxFag hOaN9yax9TBNbo4tQJtC/hLW4r9Y0WISwDmnthCRpD7ZvV8dagVla07LJ9/pHwVT7RT18VN1ZF8g/ DrbuFvsfmWWvkhLTdMEj1gg2DHCbKZAAtTtz6jrL2sL1Jz/3lxDwJDX1P5ipAPUAhUQzVT3lI63Ci ZyFm9Xz9K4idxVBQZ3gVqItPOpmg1hjm7yygwvASTV6+9aQ5hWSBWXl+Xlvs3FfnF74hIuSB0AK7S wJ+4TeXOF4MTxlc6SR9CB0JXCAeaRZgsdea2xBiT9D5MoIbYsfJHri7lQ2bsq3BB/BTPGfIpKsp3G K4jdulWtRO7y/w==; In-Reply-To: <87h6nrwqvq.fsf@yahoo.com> (message from Po Lu on Mon, 18 Sep 2023 21:30:17 +0800) 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:310705 Archived-At: > From: Po Lu > Cc: Alan Mackenzie , incal@dataswamp.org, emacs-devel@gnu.org > Date: Mon, 18 Sep 2023 21:30:17 +0800 > > Eli Zaretskii writes: > > > I'm confused: suppose one thread modifies scroll-margin -- does that > > affect the (global) redisplay? If it does, how will this "solve" the > > problem? If it doesn't affect redisplay, how _can_ a thread change > > scroll-margin in order to affect redisplay? > > It can't. Such adjustments must be performed from the main thread, as > in all other modern GUI systems. So a non-main thread cannot do anything that affects the display? Like move point in a buffer that is shown in some window? > This is no different from other GUI systems, where calling functions or > setting variables that affect the UI outside the main thread is strictly > forbidden, and either gives rise to a prompt crash or aborts with a > failure indication. That multiple threads are incapable of sharing > control over a functioning GUI system is a lesson taught with sweat and > blood, and for it to be lost on us would be an awful shame. If non-main threads cannot change stuff that affects the display, what can those threads do? compute the 10ⁿ-th digit of π? Useful stuff in Emacs almost always affects the display, so if a non-main threads cannot do that, they will be useless. Or what am I missing? > Just two cents from someone who actually _HAS_ a multi-processing Emacs > in a quasi-functional state. IMNSHO, if you left the display issues unsolved, you are no closer to the solution than we are in Emacs 30.