unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Gemini Lasswell <gazally@runbox.com>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <877ek780f4.fsf@gmx.de> (raw)
In-Reply-To: <87k1o7wdx7.fsf@runbox.com> (Gemini Lasswell's message of "Thu, 30 Aug 2018 17:57:40 -0700")

Gemini Lasswell <gazally@runbox.com> 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.



  reply	other threads:[~2018-08-31  7:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180827155307.16925.11045@vcs0.savannah.gnu.org>
     [not found] ` <20180827155309.D5C18209C1@vcs0.savannah.gnu.org>
2018-08-29 13:51   ` scratch/list-threads 833a2d4 2/9: Make lisp/thread.el the new home for thread-related Lisp functions Michael Albinus
2018-08-31  0:57     ` Gemini Lasswell
2018-08-31  7:23       ` Michael Albinus [this message]
2018-08-31 13:19         ` Stefan Monnier
2018-08-31 13:41           ` Michael Albinus
2018-08-31 15:16             ` Stefan Monnier
2018-08-31 15:07           ` Eli Zaretskii
2018-09-03 13:14             ` Stefan Monnier
2018-09-03 14:15               ` Michael Albinus
2018-09-03 15:07               ` Eli Zaretskii
2018-09-03 15:17                 ` Stefan Monnier
2018-09-05 16:49             ` Gemini Lasswell
2018-09-05 17:48               ` Eli Zaretskii
2018-09-03 10:08           ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ek780f4.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=gazally@runbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).