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: Thu, 21 Sep 2023 07:23:58 +0300 Message-ID: <83y1h09msh.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> <83msxjed5c.fsf@gnu.org> <83ediuck9t.fsf@gnu.org> <87cyydverf.fsf@yahoo.com> <83v8c5awj0.fsf@gnu.org> <87wmwlrqiq.fsf@yahoo.com> <1736496a-f211-39d2-fa97-c3fad148cc39@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26643"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 21 06:24:31 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 1qjBEs-0006fE-AW for ged-emacs-devel@m.gmane-mx.org; Thu, 21 Sep 2023 06:24:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjBEJ-0004Qn-Sh; Thu, 21 Sep 2023 00:23:55 -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 1qjBEH-0004Q4-QY for emacs-devel@gnu.org; Thu, 21 Sep 2023 00:23:53 -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 1qjBEG-0005h1-M1; Thu, 21 Sep 2023 00:23:52 -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=PdbS8hbEUoLFOSR15FHZXGMHlEPu7SQmv2tPB2+3sgI=; b=oWLoIICQPURn Y0W9AjvOIpIXTJQ2oYb7QYYHypxoZ6JIXQ6P5ijAkT94DBs1BM4OQ583Qg+n9IrGLgwQ2KXMfkeD/ xg2JvhYeFHSxLu+URETUvAbpRbuz9AVkXiRrYCa5LM5zn5RJ5PTitPzf+d73FykFoWbfZCxZ5J9+r 3qa307cXV4xn24+2czFX/thlM4Uvu50Mc6flNrBnrNvow+Usmlwweky0SFu1/4qYvW0scTRdw2xBt nxceRzrHetWFzt/25HrKwp/J4j1bmAGBgVEY75Gwq+gPyFuAbHBP2A+z3vBlQ0ZHDSjhLxxV3enhR 7s0oYOKyAPmFdrwCvVa/EA==; In-Reply-To: <1736496a-f211-39d2-fa97-c3fad148cc39@gutov.dev> (message from Dmitry Gutov on Wed, 20 Sep 2023 21:50:59 +0300) 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:310862 Archived-At: > Date: Wed, 20 Sep 2023 21:50:59 +0300 > Cc: acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org > From: Dmitry Gutov > > Though perhaps redisplay wouldn't be triggered by threads at all - not > often, anyway. A thread could send a "request for redisplay" (if it > needs to call something like 'redisplay' or 'posn-at-point'), at which > point it might get suspended until the "display thread" gets to it. Nitpicking: posn-at-point and similar functions are not "redisplay", they don't redraw any windows. They just execute some code which is also used by redisplay. So there should be no problem calling posn-at-point regardless of any UI thread and other threads, as long as access to buffer text is possible.