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: Wed, 20 Sep 2023 20:27:39 +0800 Message-ID: <87editrpvo.fsf@yahoo.com> References: <87sf7fc7kd.fsf@dataswamp.org> <834jjuk68t.fsf@gnu.org> <87cyyhc7uu.fsf@dataswamp.org> <83ttrsg9nx.fsf@gnu.org> <83h6nrg4eg.fsf@gnu.org> <83v8c7elan.fsf@gnu.org> <877conk5ny.fsf@localhost> <83ttrreeu0.fsf@gnu.org> <87bkdzeas1.fsf@localhost> <83cyyfe5l8.fsf@gnu.org> <8734zbyu6o.fsf@dataswamp.org> <835y46e8o9.fsf@gnu.org> <87zg1ixvnc.fsf@dataswamp.org> <83sf7acp86.fsf@gnu.org> <87msxiuxqd.fsf@yahoo.com> <83bkdycjqu.fsf@gnu.org> <878r91vel8.fsf@yahoo.com> <83ttrpaw8r.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18212"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 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 Wed Sep 20 14:28:26 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 1qiwJc-0004RF-W2 for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Sep 2023 14:28:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiwJE-0002Fl-QZ; Wed, 20 Sep 2023 08:28:00 -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 1qiwJB-0002FX-GV for emacs-devel@gnu.org; Wed, 20 Sep 2023 08:27:57 -0400 Original-Received: from sonic303-21.consmr.mail.ne1.yahoo.com ([66.163.188.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiwJ9-00086R-Er for emacs-devel@gnu.org; Wed, 20 Sep 2023 08:27:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695212872; bh=WbMCMt18GP+sAjhpvn7s/6d0UP7J54OFUAUhTPNN7gs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=kCnMZ9AsAwIx1eJkrE3cMCSJ06emHCb6AxaOZptmwb9MCkJ6JkU+xKzDepHyf0FCt+oBhOuW5kcDGtJfi3XX9tTNcFfDJ2r/CCQkkMsezNXL2pKtVcnGy6tuOwOPrwS8sUuLrZvDLTfs6cH8c+J8SquxaiqLf9WWkqVps5ZfsNt1RODqd8HQ/PsZFPdOAm93Le1vtvYI1fIxbMpLj9onLYJqHXutf3ThY9nJ1Wj/ixwjfFLrbCyuo4XypkZ8t1u7alWpfGBmP26unpHlE2ru707Ix+xOMKPRpYy+gYblEwZd4LPHQd1MmvLArhfzeCLwjclWABxT2uW0GEfoo7vZTA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695212872; bh=Ghbw5/TFChADfs1Ay7m3XDd+q8jsyKFkLj+tLINSsku=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=FMAhBKXksl5jSkvmNGBW5qRNSxDa4o2tytVbs8M3B5PYgbsNxWSXuZRSj8tlIIHoBhn9sy25i2oyV8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BJ1AGIGTV94p7lIQ F7T39M7fkUNjm3HCSXVhZxeiRpz.lOodsujvGEKxNy X-Sonic-MF: X-Sonic-ID: 7945a2cd-54e8-44bb-81cd-3f8662f757b1 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Wed, 20 Sep 2023 12:27:52 +0000 Original-Received: by hermes--production-sg3-55c667b499-tw4nx (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a37be0ce130cebac91449eba352fe1ca; Wed, 20 Sep 2023 12:27:45 +0000 (UTC) In-Reply-To: <83ttrpaw8r.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 20 Sep 2023 15:02:12 +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.188.147; envelope-from=luangruo@yahoo.com; helo=sonic303-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:310832 Archived-At: Eli Zaretskii writes: > That is _everyone's_ solution, not just yours. But it is not as easy > in practice as it may sound. E.g., imagine a subroutine that is > called by some higher-level functions, where both the callers and the > subroutine need to access the same variable. When other threads are > running, there's no longer a guarantee that both the caller and the > callee will see the same value of that variable. If they must use the > same value, you now need to pass that variable to the callee via its > API, and this is not scalable when you have more than a couple, > especially if the callee is not called directly, but via several > intermediate callers. Then the other solution is to establish temporary thread-local bindings for each of those variables. I'm not looking forward to the drudgery of ascertaining precisely which variables warrant such treatment...