3

我正在 sbcl 上编写一些 lisp 代码,以便在模式守护进程中运行函数。问题是当我使用函数 sb-thred:make-thread 时,例如如下:

(sb-thread:make-thread (lambda () (progn (sleep 1) (when t (print "background action")))))

我收到以下错误消息:

Not supported in unithread builds. [Condition of type SIMPLE-ERROR]

怎么了 ?... 感谢帮助。

4

1 回答 1

4

SBCL 在 Mac OS X 上默认禁用线程。检查 SBCL 是否使用在 repl 中运行的线程构建

(member :sb-thread *features*)

如果没有,请从源代码编译它(使用您当前的 SBCL)。从安装

sh make.sh --with-sb-thread
于 2014-01-22T21:47:49.830 回答