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: scratch/list-threads 833a2d4 2/9: Make lisp/thread.el the new home for thread-related Lisp functions Date: Fri, 31 Aug 2018 09:23:11 +0200 Message-ID: <877ek780f4.fsf@gmx.de> References: <20180827155307.16925.11045@vcs0.savannah.gnu.org> <20180827155309.D5C18209C1@vcs0.savannah.gnu.org> <87tvndxovu.fsf@gmx.de> <87k1o7wdx7.fsf@runbox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535700112 11519 195.159.176.226 (31 Aug 2018 07:21:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 31 Aug 2018 07:21:52 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Gemini Lasswell Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 31 09:21:48 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 1fvdka-0002tz-Iy for ged-emacs-devel@m.gmane.org; Fri, 31 Aug 2018 09:21:48 +0200 Original-Received: from localhost ([::1]:52257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvdmg-000883-Rp for ged-emacs-devel@m.gmane.org; Fri, 31 Aug 2018 03:23:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvdm2-00087m-Ew for emacs-devel@gnu.org; Fri, 31 Aug 2018 03:23:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvdlz-0006fw-B1 for emacs-devel@gnu.org; Fri, 31 Aug 2018 03:23:18 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:48689) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fvdlz-0006fR-1z for emacs-devel@gnu.org; Fri, 31 Aug 2018 03:23:15 -0400 Original-Received: from detlef.gmx.de ([212.91.238.173]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MEsXW-1g7AMM1GjS-00G3Rq; Fri, 31 Aug 2018 09:23:12 +0200 In-Reply-To: <87k1o7wdx7.fsf@runbox.com> (Gemini Lasswell's message of "Thu, 30 Aug 2018 17:57:40 -0700") X-Provags-ID: V03:K1:6TtKA15AkWacG2V9ENhz7T8UMuNH0Azlrab4fOOBdmCYC4i/8Ek GT0OXZK3lNlgzlBb0GDh4PKuhs/8lGRo/EdJZMEG0uT+47lYEJVsR7XwiqlhGyPd+YK94ZL pbjgBjylmMQQK+mrLbyDSOW1NptRzvyl4s7nie94IDZO1mfUvxxcQ/4X/anutt3Nrv98Bgn VRDc6hPQG4fjwA3vJj+dw== X-UI-Out-Filterresults: notjunk:1;V01:K0:yxB04roSAPY=:QPMQafAI/jkEt9roJNDh0M ehsEyQUfISWD3Cb+1pJ1zFhKRMsImug5NBRgGJTPJHpAaKb9aGJsTiSfQGPOgNo0Fj4TkD42p byAYLL83QARA/SaytooZamcYQxR4SBhz+ZSh0jih71+bo4JjLyylidljnZ3M83EI8qbLSBH69 dSPt49AOFwMOp9EvokUt8lUe4Wd3zv887m57dX4TOXcQhmng5R7FdRXXd4+dMzhURsuQQUKJd 53OPN+vmo/NJ5iK9JqQneKdZZ7YAZE912MKsdxi1ABJusRpkNTW6AaKRBffl9FSiFe2HnljKt c0tuRIAtt+NcpuzHkJbh5W7XWMx8Pr6OY21+smaEaKnt677NIuNDW6U32mAkz0j0FA2CtT65T 7Z5J3yLHulkR+q6Yx8h+Qm33IYIV/ATAF+mJ+4B6XxOX38v5Y8XbS3Cumk/0kI0rGkevMyq3u 8yiVwFG7pweIZoKLng8R5mvuX1PTdjy58Hmp7TBngWeCJwjbXgesKFyyjKA2b9gvD9Un0gI1k ri1fWBvwsWbydgrxd9RIcPPuNQNUL15G8u7sN+mHz1wzgjj9S7cFW2oshhaVHj+yp4WzvyiCo FxClYFgvz517i79UqQMZGZrmNjCxX2N27zGWNV9TOYDF/Aw04vo/0r7TN6OwYTLmRVrmeJrj3 AyQfaAZJ18mEUru2YrQBpnq8DCI6+0JtbedByIW6AKEKXGxOHGDR8ytO4lBc4vsqXBqAn6i9x FIdA3OXGN0sHYbSXhBDt4R0+y+Hpn6M7YTSXFJdtp1CL2ga/R+TDr8gaB3zOplv01zmFwOkX X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 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:229130 Archived-At: Gemini Lasswell writes: > Hi Michael, Hi Gemini, > That made me wonder why thread.c needs to provide `threads', so I looked > at the history of that file and found that you were the one who added it > (3744fda5fa), apparently in order to be able to skip tests if Emacs is > built --without-threads. Yes, but not only for skipping tests. Everybody who implements something based on threads shall have a simple mean to see, whether thread support is configured for Emacs. > It seems to me that (bound-and-true-p main-thread) would work as a > substitute for (featurep 'threads) in the skip-unless forms in the > thread tests. Can you think of a reason why it wouldn't? It would work, of course. But I'm a finicky German :-) `featurep' is the default way in Emacs to check, whether a feature exist, so I've done it this way. Maybe we could do something similar to D-Bus support in Emacs: in src/dbusbind.c the feature `dbusbind' is provided, and in dbus.el there is the feature `dbus'. The former allows you to check, whether D-Bus support has been configured for Emacs. So we might provide the feature `threads-supported' or similar in src/thread.c. WDYT? > Gemini Best regards, Michael.