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: Concurrency via isolated process/thread Date: Thu, 06 Jul 2023 20:41:43 +0800 Message-ID: <87jzvdjjp4.fsf@yahoo.com> References: <871qhnr4ty.fsf@localhost> <83v8ezk3cj.fsf@gnu.org> <87v8ezpov0.fsf@localhost> <83r0pnk2az.fsf@gnu.org> <87pm57pns8.fsf@localhost> <87lefvp55t.fsf@yahoo.com> <87sfa28ura.fsf@localhost> <87cz16o8vz.fsf@yahoo.com> <87jzve8r4m.fsf@localhost> <871qhmo5nv.fsf@yahoo.com> <87bkgq8p5t.fsf@localhost> <831qhmjwk0.fsf@gnu.org> <875y6y8nlr.fsf@localhost> <87h6qhnalc.fsf@yahoo.com> <87ilax71wo.fsf@localhost> <878rbtkz2c.fsf@yahoo.com> <87a5w96x2o.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18081"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 06 14:43:06 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 1qHOK8-0004QY-6K for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Jul 2023 14:43:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHOJ5-0002KK-VY; Thu, 06 Jul 2023 08:41:59 -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 1qHOJ4-0002K5-FD for emacs-devel@gnu.org; Thu, 06 Jul 2023 08:41:58 -0400 Original-Received: from sonic312-23.consmr.mail.ne1.yahoo.com ([66.163.191.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHOJ2-0003Wv-A9 for emacs-devel@gnu.org; Thu, 06 Jul 2023 08:41:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688647314; bh=KciAKczwHbN+ZTAThuofWmtsoy+hAnwaKs4X3WjNNxk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=eNO2tVm+vee+/xJ0LJBHeBTQeQeLUUyOgKl8qtRZxx5XC8tVPJ6PUUdzq5HVxJWffA1fSp3HZUbYHFD/tpaySX8FgZsSMCRvANmlufo/Y98GQJefTm6NJW2ST/B93Mg06EunmydTryrWZcHoehX9Ewxd7rS8cmZ4dcYgkDLSBvWD0dc8NjDB5B73dOkp+QGOkvbtHfs77VdbPpECUqqdB31mXrINAXgEr0CIg2qXl5YBSE9j0qYwVvILh45qa8QDtvYoqrp7RG9UloxDQpz0sQBgmAQEnkYwwcEf3CmDp+KOxojxkES0Aiglu4PY6J21PnMF8nzsu//CQTNs7FBFQg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688647314; bh=6Y7R5gAmpgcXYAF7KC1O5U2mMAoNZPv4e6DPBGRgQyo=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=lgM9/7v+hwitcTuf9K9AM8SnEWRyLJgwKyV65cawytkN7w6dsuuI4aaqGrntqF+S/c0pPzaqeo6md1vajlXge4cS9PmC4/tTkUMVudsap/ovrSDj0RiQsZlFDnsxJe9P/S4zE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F: X-Sonic-ID: baf66f3e-f1d6-44ce-a24b-648ea21e33a0 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ne1.yahoo.com with HTTP; Thu, 6 Jul 2023 12:41:54 +0000 Original-Received: by hermes--production-sg3-67fd64777-t6vwt (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 3df7c060349f1666533f69ad2ecf0059; Thu, 06 Jul 2023 12:41:49 +0000 (UTC) In-Reply-To: <87a5w96x2o.fsf@localhost> (Ihor Radchenko's message of "Thu, 06 Jul 2023 12:31:11 +0000") X-Mailer: WebService/1.1.21638 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.191.204; envelope-from=luangruo@yahoo.com; helo=sonic312-23.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:307501 Archived-At: Ihor Radchenko writes: > I am thinking about some kind of extra flag that will mark an object > locked: > > LOCK_OBJECT (foo); > LOCK_OBJECT (XCAR (foo)); > CHECK_STRING (XCAR (foo)); > foo = XSTRING (XCAR (foo)); > UNLOCK_OBJECT (XCAR (foo)); > UNLOCK_OBJECT (foo); > > LOCK_OBJECT will block until the object is available for use. This is unnecessary. Loads and stores of Lisp_Object values are cache coherent except on 32 bit systems --with-wide-int. XCAR (foo) will always load one of the values previously written.