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: Fri, 07 Jul 2023 08:21:27 +0800 Message-ID: <87y1jsinaw.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> <87jzvdjjp4.fsf@yahoo.com> <877crd6w53.fsf@localhost> <877crdjiwn.fsf@yahoo.com> <874jmh6v4s.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="20392"; 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 Fri Jul 07 02:22:15 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 1qHZEk-00054P-P7 for ged-emacs-devel@m.gmane-mx.org; Fri, 07 Jul 2023 02:22:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHZEH-0006P0-88; Thu, 06 Jul 2023 20:21:45 -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 1qHZEB-0006OP-Bw for emacs-devel@gnu.org; Thu, 06 Jul 2023 20:21:43 -0400 Original-Received: from sonic312-25.consmr.mail.ne1.yahoo.com ([66.163.191.206]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHZE9-0001fF-BM for emacs-devel@gnu.org; Thu, 06 Jul 2023 20:21:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688689295; bh=4Y6kOmPR9vcHO0O+uQwFnll8QjTBnmmboN7IHP8b9ZE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=NawJTZVp+a4kCFrxZEc5pdUTnwAI+EHY1Wr0CJ6uCophh2STBaxEO9jvFdb42kaDPZVNPs9Qshy+2ap1LnoFBaNKZBqyU0LCOXrKXB0zAT952SXn0sU3PhfulSH/i3SQpcjiIjPPZH5KtDp16mvwrbGfQG8yrFGLBPnASvQjV2ANBMz4DmgPJct36I6M2pK0eitLBUOGO4FpuKk2L6CoNYX/2aRHmXyrqIs9BNm03hJAGGGXjDenL2OBcbAbXa0jZCAU+qcWhcC2LyBszk74FxDaQ6A+W/Dx2y6Dp0dXQeOUQnmVf/o7kKhQrRuOM3rJ47TUqWvaWPvpniAiIqU91g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688689295; bh=73L8u4KoOcy6bY/Ufs0gdonNCjKmQj1hUcC/6rdZ9cH=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=OiiSHvdOc4+0cPuSl43AYykqmUyPYhw5CRuxa9XUiREb4YFmO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X2PaTbAH2PSNgEwy9V.mX2urdn6oPPfcvr1kM9ZsOfeDY8Xh94meb6pfgQ3omPf uYexxVi3WWYPXWTqTByalb.MIMl9M3oqt2fv7zeVBi X-Sonic-MF: X-Sonic-ID: 4ac97894-c056-4af3-b626-c0053040c528 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ne1.yahoo.com with HTTP; Fri, 7 Jul 2023 00:21:35 +0000 Original-Received: by hermes--production-sg3-67fd64777-lqw65 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID dba0a7a6489d4c3fb632cb7495ae22d8; Fri, 07 Jul 2023 00:21:32 +0000 (UTC) In-Reply-To: <874jmh6v4s.fsf@localhost> (Ihor Radchenko's message of "Thu, 06 Jul 2023 13:13:07 +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.206; envelope-from=luangruo@yahoo.com; helo=sonic312-25.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=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:307537 Archived-At: Ihor Radchenko writes: > Po Lu writes: > >>>>> LOCK_OBJECT (foo); >>>>> LOCK_OBJECT (XCAR (foo)); >>>> ... >>> ... >>> Do you mean that locking XCAR (foo) is unnecessary when foo is locked? >> >> No, that there is no need to lock a cons (or a vector, or anything else >> with a fixed number of Lisp_Object slots) before reading or writing to >> it. > > I feel confused here. > > My understanding is > > CHECK_STRING (XCAR (foo)); > > foo = XSTRING (XCAR (foo)); > > So, locking is needed to ensure that CHECK_STRING assertion remains valid. No, what we want to make sure is that the same string whose type was checked is extracted. By not loading XCAR (foo) twice.