有没有一种简单的方法可以通过 MCLIDE/swank 将多个 sbcl 线程的跟踪写入标准输出?

发布于 2024-09-17 23:16:00 字数 601 浏览 1 评论 0原文

使用 SBCL,我正在编写一个小型服务器,我想跟踪服务器线程,但是当我使用 mclide/swank 时,我看不到服务器线程的任何输出。

? (需要'sb-posix) 零 ? (sb-thread:make-thread (lambda () (format t "hi from the thread")))

当我直接从 sbcl 尝试同样的事情时,我看到了我所期望的:

  • (require 'sb-posix) ;加载系统定义 ; /opt/local/var/macports/software/sbcl/1.0.39_0+html+threads/opt/local/lib/sbcl/sb-grovel/sb-grovel.asd ;进入 # ;将 # 注册为 SB-GROVEL ("SB-POSIX" "SB-GROVEL" "ASDF")
  • (sb-thread:make-thread (lambda () (format t "hi from the thread"))) hi from the thread#
  • *

swank 在从非前台线程捕获标准输出时是否存在问题?如果我用史莱姆的话,这种东西有用吗?

Using SBCL, I'm writing a small server and I would like to trace the server thread, but when I use mclide/swank, I do not see any output from the server thread.

? (require 'sb-posix)
NIL
? (sb-thread:make-thread (lambda () (format t "hi from the thread")))

?

When I try the same thing from sbcl directly, I see what I expect:

  • (require 'sb-posix)
    ; loading system definition from
    ; /opt/local/var/macports/software/sbcl/1.0.39_0+html+threads/opt/local/lib/sbcl/sb-grovel/sb-grovel.asd
    ; into #
    ; registering # as SB-GROVEL
    ("SB-POSIX" "SB-GROVEL" "ASDF")
  • (sb-thread:make-thread (lambda () (format t "hi from the thread")))
    hi from the thread#
  • *

Does swank have issues capturing standard output from non-foreground threads? If I used slime, would this kind of thing work?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文