diff --git a/apiv2/impl-ecl.lisp b/apiv2/impl-ecl.lisp index 3a32ff6..19db981 100644 --- a/apiv2/impl-ecl.lisp +++ b/apiv2/impl-ecl.lisp @@ -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)) diff --git a/test/tests-v2.lisp b/test/tests-v2.lisp index 72d8588..9fbde96 100644 --- a/test/tests-v2.lisp +++ b/test/tests-v2.lisp @@ -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