Skip to content

Commit

Permalink
Test that thread names are always strings
Browse files Browse the repository at this point in the history
  • Loading branch information
sionescu committed Jan 31, 2022
1 parent df9748c commit d5692d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apiv2/impl-ecl.lisp
Expand Up @@ -16,7 +16,8 @@
mp:*current-process*)

(defun %thread-name (thread)
(mp:process-name thread))
;; Some system threads have symbols for a name.
(string (mp:process-name thread)))

(defun %join-thread (thread)
(mp:process-join thread))
Expand Down
4 changes: 4 additions & 0 deletions test/tests-v2.lisp
Expand Up @@ -44,6 +44,10 @@
(is (equal "foo" (thread-name
(make-thread (lambda () t) :name "foo")))))

(test thread-name.all-strings
(is (every #'(lambda (thread) (stringp (thread-name thread)))
(all-threads))))

(defparameter *some-special* :global-value)

(test default-special-bindings.sees-global-bindings
Expand Down

0 comments on commit d5692d9

Please sign in to comment.