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: master 8dcb19f 4/4: Add a unit test testing interaction between threads and processes. Date: Sun, 24 Jan 2021 00:26:50 -0500 Message-ID: References: <83k0s34eo1.fsf@gnu.org> <83h7n74cwe.fsf@gnu.org> Reply-To: Eli Zaretskii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1162"; mail-complaints-to="usenet@ciao.gmane.io" Cc: phst@google.com, emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 24 06:27:37 2021 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 1l3Xw1-0000BJ-DK for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Jan 2021 06:27:37 +0100 Original-Received: from localhost ([::1]:54238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3Xw0-0001Kl-Fo for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Jan 2021 00:27:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3XvH-0000uH-BU for emacs-devel@gnu.org; Sun, 24 Jan 2021 00:26:51 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54193) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3XvG-00082p-QU; Sun, 24 Jan 2021 00:26:50 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1l3XvG-00025o-Ds; Sun, 24 Jan 2021 00:26:50 -0500 In-Reply-To: (message from Philipp Stephani on Sat, 23 Jan 2021 21:33:29 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:263331 Archived-At: > From: Philipp Stephani > Date: Sat, 23 Jan 2021 21:33:29 +0100 > Cc: Philipp Stephani , Emacs developers > > > Can you describe the idea of the test, > > This test essentially implements your request to verify the > interactions between the self-pipe for SIGCHLD and threads. Seems it > discovered some issues on Windows instead! The test works fine on > GNU/Linux and macOS. Thanks, but this doesn't really answer my question. I think I understand what the code does, but I don't know what was the intent in writing it. There are some things the code does whose rationale I don't understand. For example, why the call to set-process-thread: what's the purpose? Or why no-conversion in make-process? More generally, what is the basic idea of the test and the expectation from each thread. > > and in particular why did you > > expect the threads to start running? IOW, which part of this test is > > supposed to force the main thread to yield so that one of the other > > threads starts running? > > thread-join should yield. Isn't that too late? The processes have exited already, so what does that test?