sb-thread:make-thread sets thread's package to CL-USER

"Raimondas K." <[email protected]>
Newsgroups gmane.lisp.steel-bank.general
Message-ID <CAKFDN2S5vr+s6eCHBjAKLhr6UWVLsKK1siakKGz0xht_6Gm-Bw@mail.gmail.com>
I don't see this explicitly documented either way,
but it looks that, empirically, the *package* inside the
newly created thread is set to COMMON-LISP-USER.

To demonstrate
(defpackage :my (:use :cl))
(in-package :my)

(defun test ()
  (format *standard-output* "in TEST thread: package ~a~%" *package*))

(format *standard-output* "in MAIN thread: package ~a~%" *package*)

(sb-thread:make-thread #'test
                         :arguments '()
                         :name "test")

SBCL 2.3.2 prints out
in MAIN thread: package #<PACKAGE "MY">
in TEST thread: package #<PACKAGE "COMMON-LISP-USER">

Not sure if this is how it is supposed to work; I find this
behaviour counterintuitive, c/w for instance, with (load "file").

   =R.

_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.