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: Stefan Monnier
Subject: Re: scratch/list-threads 833a2d4 2/9: Make lisp/thread.el the new home for thread-related Lisp functions
Date: Mon, 03 Sep 2018 09:14:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> What's wrong with (fboundp 'make-thread)?
> That (AFAIK) it returns non-nil even when threads are not available?

What is the reason for this?

Is it because we want to lazily try to load the relevant shared
library, so we don't know before the first call whether that shared
library is actually available?

> I could use then (configured-feature-p 'threads) in order to know
> whether Emacs has been configured --with-threads, explicitly or implicitly.

What if Emacs was configured --with-threads but at run-time the shared
lib is not available?
Maybe instead of

    (fboundp 'make-thread)

the better choice is

    (progn (ignore-errors (make-thread #'ignore)) t)

?


        Stefan




reply via email to

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