From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Return value of finished threads Date: Sat, 21 Jul 2018 16:33:25 +0200 Message-ID: <87zhykbqve.fsf@gmx.de> References: <87h8kuq7kf.fsf@gmx.de> <87h8kt3hcj.fsf@tromey.com> <87wotphqre.fsf@gmx.de> <87lga44u14.fsf@tromey.com> <874lgsivam.fsf@gmx.de> <87h8ks4qot.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1532183543 12189 195.159.176.226 (21 Jul 2018 14:32:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Jul 2018 14:32:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 21 16:32:18 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgsvi-00035X-Ox for ged-emacs-devel@m.gmane.org; Sat, 21 Jul 2018 16:32:18 +0200 Original-Received: from localhost ([::1]:52620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgsxp-0003ro-GF for ged-emacs-devel@m.gmane.org; Sat, 21 Jul 2018 10:34:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgsx7-0003rc-8J for emacs-devel@gnu.org; Sat, 21 Jul 2018 10:33:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgsx4-00075S-3N for emacs-devel@gnu.org; Sat, 21 Jul 2018 10:33:45 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:51227) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fgsx3-00074G-Pi for emacs-devel@gnu.org; Sat, 21 Jul 2018 10:33:42 -0400 Original-Received: from detlef.gmx.de ([178.20.95.32]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MfVYB-1fMDpU1p2R-00P6JF; Sat, 21 Jul 2018 16:33:27 +0200 In-Reply-To: <87h8ks4qot.fsf@tromey.com> (Tom Tromey's message of "Sat, 21 Jul 2018 08:19:14 -0600") X-Provags-ID: V03:K1:gHQWzrwNlqv6ILGbPLbqht5c9jSzqOlbUUvirxstn1SKJoDcJUH cyo9htJDCrvOngdrkJzWgtOLIZ5IXpZqt+unhLo9Pe4BwL3vrnIAKATxhozTjCRr3IuuuVe HiwYbtpS0NUBo/a5qqy+iQ6LG4hOdP0/DtkkXrPbxVv4nwb1b3fh4ZuIeTxx7N4+f4IcAB5 +NFn5uegf1AAfDOi2BPqA== X-UI-Out-Filterresults: notjunk:1;V01:K0:0PweNPkYXbI=:s4VOPPeb058EQRwvR8gDbO a7yugW/Q0/8iu4UDbie9IBXJ+YajoS7SqWSTEmwFPMQBQKjGn0fbsJmin50CXt8t+RLHiEYEW KSSi4UpX31BhdkgV16V/7Arv1dS+SKh/KTM7npMH0vHH8itAczX4t8p36gs0hePdyh3L/k6Qw GL/x6fhaUnGKEM7c91BawDLEYeijfTJwwIdiufm8fmK+pWIO47lnrnfFa9h67p29rJH7wJlHM dGbYxan/GDlbxxsusehO0IUr6I9PFnZ5hDDE+hPTjE6H+PwptnQhfHs76kn/qNdSIIzpCqWY3 K/QCpu9y4gjagfBafcNGxgdLQeftrpQ/8UVSGWPMPFdo+1lFMic2D8KAbQ9LJ+W53KoW9Y5yk GGnk54LqLD31r6dBwwgGoABFcauJDZm9Pb1uWsch951rwXerrq9D36E5/UvfW578cAyvTOg/r mqwxQxT46bEyxtTCKIgakwxdHos86nLget9Ro44sMYPCs5Rc+OXr79vQeb791a0VHFy0KV2Lb fhO7YLJ0OuAuv0dlREEdmlomytt+8yko5P0nyUh9QuftG1vxqCt77BS8kCRbSquEV4VNr86EJ qX32m2InPB7l6ahowzBWtO2TiW6wfbfTRL3wTNstOZ/ce6iLsSx/66OLR9/13J1q3ap2F9z+p +WVzYI/8rnF96EBpGnJ9YEN6YBn56ghjq3v8rGgwtaWOAh5P6KiJd53d+4v8anXMTwQ5vI0Kn lM0GFFzr6N8ist0Yg6mAvWCvwMBeYUBWfs9MYlA6zfviJ7EU7yfmiXGlNN0efCKNwbyQDAVo X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227619 Archived-At: Tom Tromey writes: > Michael> Yes, likely until a thread-join has happened. And a second > Michael> thread-join on the same thread shall always return ni. > > I was wondering which semantics would be preferred here. > Having each thread-join return the same result doesn't seem so bad either. I have no strong preference. But returning the result only once has the advantage, that you could remove all thread data from a dead thread, once the result has been shown. > Michael> How long do we keep the results of dead threads, for which no > Michael> thread-join happens? Do we need a Lisp cleanup function, which purges > Michael> all dead threads results? Or does this the GC, when no Lisp object holds > Michael> the dead thread any longer? > > I didn't look deeply but I think instead of mark_threads, alloc.c would > need to mark any thread it runs across; and then mark_one_thread could > handle exited threads specially. This goes into the darkness I'm not familiar with. > Michael> (Btw, I believe it will be much better when you implement this. It is > Michael> still hard for me to read and modify threads.c) > > I will see if I can find some time. But I think your patch is close so > you should keep going :-) Sure. I use my patch locally to work on Tramp threads, but I won't push it upstream. > Tom Best regards, Michael.