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: master fa52782f5c: Make timer_check even more resilient Date: Fri, 29 Apr 2022 20:40:09 +0800 Message-ID: <87v8usvz9y.fsf@yahoo.com> References: <165123452355.15775.3995648788143039474@vcs2.savannah.gnu.org> <20220429121523.D82E8C06322@vcs2.savannah.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="25428"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Pip Cet To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 29 14:42:51 2022 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 1nkPxT-0006OL-K8 for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 14:42:51 +0200 Original-Received: from localhost ([::1]:33724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkPxS-0004kj-96 for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 08:42:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkPwA-0003gE-9d for emacs-devel@gnu.org; Fri, 29 Apr 2022 08:41:30 -0400 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]:32972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkPw7-0003Gy-Ll for emacs-devel@gnu.org; Fri, 29 Apr 2022 08:41:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1651236021; bh=jMMESFcX5Ogyu9RK7zIMmPCOCN9WqOyemmN8w6t5MkI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=pbwcyjbeqbExBECsrUfPyKBwgAef0BCW8wyFOo4LT/u0teyuJgG6PZqWbJVERkU6l6vmVGplgLNAzqs14lbYURpGe+CXKitVewMNGSjlftcIIceYJuhGq1PAsfbvIJHjsT1nCgOa2ks5a6mrbXpDjeSs7uWl2TW63NnO+qBLnDTKHirp2J0gwlNQoaZev9OWtOU8Jqps1llwKW3cC9IC2+sqmyw3nuXXAYc1J9mMGolBKRY8mduQD6aH717BboRFCV8xAxf3yKBeno77tt3xY+uTs+U8AG5xOVbObZRWw0ReLkIDx/HyWE9rjPsOYJW0OPqLlHbfgdl18tQsixXkwg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1651236021; bh=IHUN+jYdtdKgSJNZW4d5XRAq9Kw1QRvonMiXgNuQfjg=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=iNOaqqh2ZkxtsVW44m/M/8BJ3Si2+6DoOlZbVJ03Jw+MFE5+qrXcqvlXeGWmNg4DdlYOxQ/9RA5Uz7pc1tqainY7CZS3RYG8DQ5XYcc9uE1aFz2u5qA5akq1pTp/+PFvrprJydpubVZTHNthdXgN/28Sq+E7KHeCRqgPJW4BI1DYGkOzMVhMS9bJE3nyO1oJ7t63wI3QNCCyNYXB1gahhlIo5drt4A+u8rg7p783J5frRJut99P+AczDapAjERt0/kyXxF6QIiVZEVXJd+lwhLFmX5NCzX7ArknZCE1Ix1VIYCH9WDO/0c+5LJtjAtml9GuqIIXJfVRbUFGlYWXhJg== X-YMail-OSG: FoMP8XMVM1kHfNFnsG4pkcP2Xe72cS8WxbAznuX_X0I3tC7e4Qmg4UFfCkZSiwL X1VBuJM.AYP6dFIyHHumyGCVr_Ypy6V7TzO9gtjceInU2TJR9BuL34eW7LpL3OpAdp.ZLemxNnz2 WdIHBqHVYVM8Ah3g3EV98jheWK0qh3Qs509ljnXXZl12cei8CuS.88f8p3EGslNLiOWEUaW_5Lz5 Hdz3fAW09EQacmC6AncgMda7J_eH7a_1hVXD0.b1Z4kNh3y_KYUNEQUmWlPrqGsbgqaEyoCYjabq UmXzlClR6uWLbbah6TZNuwWVhmENkIPWP0k0QCJ1..WsiI93KSIVNRaXQ0Y0AuGyCkyc8A6JvSm1 PHnJWM4.9YgAvkxbT3vfgQ04o1rEmc957uD7VzShymYixDQJ9K6kyhRVrlQCvxcmz8MxEYeFj4AH aF5So78YrgXLvGSbkG8NWcpcPlKvf.MVhPWJVREwhI649fwi79IARLtvUNIfXZIl.bSdgh6lxAbh BlNLAmofotlG1fAd5ZkhpZMlCi9W1RLvK79khiTUp9o8NoMsK_Qe5zYPWTxXfDzOu.rcXqEewrPl RvkmfuT3btlrPp_2hZg5RdouX97Og3iozw7QrKceTGCEzln.JNJB1EgfNKpHe8xfW7tFgCxtgKQn NfeouSMPDqv7g8uK3VILycEUXqY53qWBKXpc5rFMueC7ylcNUP0UMBVket17cPmbshV7YWS3zkGD 86FdRLcIXdkR0oX7rhAVenWbIcXOZSGTMyANCaStS4uMEvZ1pk9F9kbYytaorEr_1hwYz69E.PAk xuMZc4LlavKXc.dUM1Z7lQopBdbJ_K4TdwPyAVR4YX X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Fri, 29 Apr 2022 12:40:21 +0000 Original-Received: by hermes--canary-production-sg3-795d7b4d54-5fwrz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 22e9303f7604be25265732a37ffa6080; Fri, 29 Apr 2022 12:40:15 +0000 (UTC) In-Reply-To: <20220429121523.D82E8C06322@vcs2.savannah.gnu.org> (Lars Ingebrigtsen's message of "Fri, 29 Apr 2022 08:15:23 -0400 (EDT)") X-Mailer: WebService/1.1.20118 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.204; envelope-from=luangruo@yahoo.com; helo=sonic310-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, 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" Xref: news.gmane.io gmane.emacs.devel:288981 Archived-At: Lars Ingebrigtsen writes: > + block_input (); > + turn_on_atimers (false); > > /* We use copies of the timers' lists to allow a timer to add itself > again, without locking up Emacs if the newly added timer is > @@ -4646,6 +4648,8 @@ timer_check (void) > else > idle_timers = Qnil; > > + turn_on_atimers (true); > + unblock_input (); Does input really have to be blocked around this? The call to `unblock_input' will end up reading async input, which might not be safe at that spot. (The X11 drag and drop code used to suffer from this problem, and debugging the resulting crashes was not easy.)