emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scratch/list-threads 833a2d4 2/9: Make lisp/thread.el the new home f


From: Michael Albinus
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Gemini Lasswell <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]