emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ee2509b: Mark thread-alive-p as obsolete


From: Michael Albinus
Subject: [Emacs-diffs] master ee2509b: Mark thread-alive-p as obsolete
Date: Fri, 31 Aug 2018 05:45:52 -0400 (EDT)

branch: master
commit ee2509bd828070ae5d17fcc766f81715050ba673
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Mark thread-alive-p as obsolete
    
    * etc/NEWS (thread-alive-p):
    * lisp/emacs-lisp/thread.el (thread-alive-p): Mark it as obsolete.
    
    * test/src/thread-tests.el (threads-join-error)
    (threads-signal-main-thread): Use `thread-live-p'.
---
 etc/NEWS                  | 3 +++
 lisp/emacs-lisp/thread.el | 2 ++
 test/src/thread-tests.el  | 4 ++--
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index d536faa..1fe662f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -731,6 +731,9 @@ to signal the main thread, e.g., when they encounter an 
error.
 Instead, error messages are just printed in the main thread.
 
 ---
+*** 'thread-alive-p' is now obsolete, use 'thread-live-p' instead.
+
+---
 ** thingatpt.el supports a new "thing" called 'uuid'.
 A symbol 'uuid' can be passed to thing-at-point and it returns the
 UUID at point.
diff --git a/lisp/emacs-lisp/thread.el b/lisp/emacs-lisp/thread.el
index 02cf9b9..5d7b90c 100644
--- a/lisp/emacs-lisp/thread.el
+++ b/lisp/emacs-lisp/thread.el
@@ -38,5 +38,7 @@ An EVENT has the format
             (err (cddr event)))
         (message "Error %s: %S" thread err))))
 
+(make-obsolete 'thread-alive-p 'thread-live-p "27.1")
+
 (provide 'thread)
 ;;; thread.el ends here
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el
index a87eb3e..109e711 100644
--- a/test/src/thread-tests.el
+++ b/test/src/thread-tests.el
@@ -116,7 +116,7 @@
   :tags '(:unstable)
   (skip-unless (featurep 'threads))
   (let ((thread (make-thread #'threads-call-error)))
-    (while (thread-alive-p thread)
+    (while (thread-live-p thread)
       (thread-yield))
     (should-error (thread-join thread))))
 
@@ -332,7 +332,7 @@
       (erase-buffer))
     (let ((thread
            (make-thread #'(lambda () (thread-signal main-thread 'error nil)))))
-      (while (thread-alive-p thread)
+      (while (thread-live-p thread)
         (thread-yield))
       (read-event nil nil 0.1)
       ;; No error has been raised, which is part of the test.



reply via email to

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