网站首页
编程语言
数据库
系统相关
其他分享
编程问答
goroutineId
2024-08-23
Go如何获取goroutineId
runtime包packagemainimport("bytes""log""os""runtime""strconv""time")funcgetGoroutineID()uint64{b:=make([]byte,64)b=b[:runtime.Stack(b,false