处理线程中的异常

Handling an exception in a thread

我的一个线程进入了调试器。我想切换到它,期待堆栈跟踪,选择重启等...我该怎么做?

我正在使用 bordeaux-threads

如果您使用 SLIME,它应该会自动运行。否则,这取决于您的实施。在 SBCL 中,(SB-THREAD:RELEASE-FOREGROUND) 应该让其他线程使用终端。

SBCL manual, 12.8 Sessions/Debugging

Within a single session, threads arbitrate between themselves for the user's attention. A thread may be in one of three notional states: foreground, background, or stopped. When a background process attempts to print a repl prompt or to enter the debugger, it will stop and print a message saying that it has stopped. The user at his leisure may switch to that thread to find out what it needs. If a background thread enters the debugger, selecting any restart will put it back into the background before it resumes. Arbitration for the input stream is managed by calls to sb-thread:get-foreground (which may block) and sb-thread:release-foreground.