提交 d0b21fbb 编写于 作者: C chainhelen 提交者: Derek Parker

pkg/proc: Fix ThreadId when ErrNoGoroutine on g0 stack in GetG

Avoid always showing `no G executing on thread 0` when ErrNoGoroutine on
g0 stack in GetG.
上级 9239013e
......@@ -509,6 +509,9 @@ func GetG(thread Thread) (*G, error) {
}
g, err = curgvar.parseG()
if err != nil {
if _, ok := err.(ErrNoGoroutine); ok {
err = ErrNoGoroutine{thread.ThreadID()}
}
return nil, err
}
g.SystemStack = true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册