gpt4 book ai didi

multithreading - 在线程中处理异常

转载 作者:行者123 更新时间:2023-12-04 08:26:07 24 4
gpt4 key购买 nike

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

我正在使用 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.

关于multithreading - 在线程中处理异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41502921/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com