社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
type g struct {
....
m *m
sched gobuf
goid int64
....
}
type gobuf struct {
sp uintptr
pc uintptr
....
}
注意,LRQ(P的Local Runable Queue),GRQ(Global Runable Queue,当Local Queue满了之后才会写入GRQ)
注意,goroutine状态转换时两个重要方法,gopark()、goready()
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!