From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Emacs design and architecture. How about copy-on-write? Date: Tue, 19 Sep 2023 07:41:41 +0800 Message-ID: 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> <83msxjed5c.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36215"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 19 01:43:10 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 1qiNtV-0009DR-St for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Sep 2023 01:43:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiNsV-0006iG-Kc; Mon, 18 Sep 2023 19:42:10 -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 1qiNsS-0006ho-VB for emacs-devel@gnu.org; Mon, 18 Sep 2023 19:42:05 -0400 Original-Received: from sonic316-21.consmr.mail.ne1.yahoo.com ([66.163.187.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiNsQ-0002gl-46 for emacs-devel@gnu.org; Mon, 18 Sep 2023 19:42:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695080519; bh=B5dd8Ux0LbYZV0yOFzi0/CrIsBSiPUHOFZnqqnYIn5Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Y6FadUv/5OcJOhp4TB8Faz/ZJJ7STRlPCXioIwsQfSOtW1QX+b3nEhqlLAp6V2z/kw9qFh0pIS3RGjkEmIhnrLiAehmk/aPSlMW3JiHF+aySu6EWr42pgGD3WQc6Li3G09uGquKJKCmSEBzCRKaMWj7maUQ6oWVgaooLc83LRskQr66zRoZE4wOi5uC5t/Gf5pplqdfjvMlH+uepATlFI94DuVroIjF9gOfYyIgfHMSED8pW+o3OOn8WOA5lU2C9qVrSHTjjGOrZ5z6uYY/ask5W2I9BcnT6ru3uRtg55zHHYua1HNCodpdFO35PuOUe5l/Em4FJvvZNI8Z56GUD2w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695080519; bh=ecgBpK8TH33Y/5P5uaziGd/76+TByLb2Ci+FaEUpWxE=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=LXfEZbmbu6HcIjvhVBT+mRF5Z/zhs9G2EHFb8Vxv/f91YcQpJu9P/MO2QQc2GsxKqAbMxu/C6uPWq61YhhiNUSMB6jPHdwYnEdBMtzNJf4LOcooDpM2fe6lFErV9wBGFk7VWuG47PSQD4IpPS0NJugt3kWtlW1thwLVb8Yp5ubOpffRKWjtUU4iv0GyUXG6TFPP5NRuAhIzb4zG2qtBoGQbRIHdkUGMR/kyqQIoJka46jxKtQgiGM5uk7Z5W7oHsfn+R3g474JigAEfhm5WaBWK8bkbJd9MiRABKT1QAv/T3r3g8QqY+Hv299cqN93qFKf5kJ3R9LFwr7uJmRhGAOA== X-YMail-OSG: zYGClvwVM1kG23qBpQToEiq5ZTAyGNcRoLaWyGKr_9Fu5uxDeMaXwrBieJvacPh qKUb2KZCsI8s5EawgA7ZhvqJVVZqGVBAAsLKhJFtCAyeubBpYlYCeNzihc9rXtyZOg.8OtB8.Oci AFNNR_VHV2itOAYcRZcjADqBaFMf637HvKGiEKkZxXaSIHEl1IEURRoAlzgqRKZG2iGw2tzElMAn cajE0qsrF6hUr2nlRroqHE3sUxoT3l57VLTnJ7iSx199p77HP2JIEPaV7TW2WIb7W0DgmB2grhCM jNBdiiOD55t8W_sLdy.CMWjICcyq7SSUWsbapKgd0T05imPOkJe2M0ihJK9PSJZbszaHwIRWuoXK p0DzALHeHwdYWSi5uMRpxE6zy5M_ixYgEJ_of_2E5rq89CtNB9AQWqdgza5UnK4jYaZxq8nysg7. r.TOexOj40QnRDL8kfNqsk5rs0mNMLW4P07OSOgG6D4byPsTtfx4.8I3lED.ZKDtpwxmU2VZNhax eTKoBQIvR7CyGJ5xeLA.EkI6n4MRVpskjupnUuc1fM_N7NWo187mBJtbCWm13u5ngBOHZ8G9YSno vmX0WASL7uQ_gVNHglp8dt5cpKUrfXKUsu4oApgkeT8j8i275pBOFkR_LBHtw8aW6xDJnkWKVXLa mwkNJcg.7BbhIDTs9Tup2TlxLy3_R2NRGGxW78JZU8OsfN_KfYpOJRwo8z8sMtNfocserInVIqhP Z4hhJEBrXfLWJa6zsZPm_PaRSryoSm_0QT0mN3YC2_.Y1VDrwL7rqiPiFuCiGze4MzEYaWRt8x1z PfeJfgsMUdGtG_pdT3Z71KMniY598bLHXiLLC86wGZ X-Sonic-MF: X-Sonic-ID: 6f2fc278-9780-40a7-b0d2-cb048a135205 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Mon, 18 Sep 2023 23:41:59 +0000 Original-Received: by hermes--production-sg3-55c667b499-p8t8q (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 36b9e2dc800206a39c9204bb23ef9fea; Mon, 18 Sep 2023 23:41:55 +0000 (UTC) In-Reply-To: <83msxjed5c.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 18 Sep 2023 18:04:15 +0300") X-Mailer: WebService/1.1.21797 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.147; envelope-from=luangruo@yahoo.com; helo=sonic316-21.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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:310728 Archived-At: Eli Zaretskii writes: > 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 possible, but moving point won't induce a redisplay of that window. > If non-main threads cannot change stuff that affects the display, what > can those threads do? compute the 10=E2=81=BF-th digit of =CF=80? And other tasks like this, responsible for blocking Emacs. Since most of the time, Emacs is not blocked in redisplay, but reading process output or performing difficult computations. > 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? Consider the case of Gnus or Eglot: it will enable either of them to fetch news or receive LSP output from a second thread, decode it, and subsequently transfer it to the main thread for display. Such expensive processing is the reason people desire a multi-processing Emacs, because it will facilitate efficiently running these operations in the background and possibly on a different CPU.