我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

检测哪个Lock()导致程序挂起?

In my go program, the execution is hung up because it is waiting for Lock(). Are there tools in go which I can use to find the exact line where it is getting deadlocked?

You can get a stack trace using pprof.

If you follow the example code in the package the url http://localhost:6060/debug/pprof/goroutine?debug=1 will give you a stack trace of every running goroutine.

近期文章

  • 如何在Go中获取指向地图中的值的指针
  • 如何使用bufio检查用户输入是否为空?
  • 遍历结构并执行数据库查询
  • Google appengine / ah / health“方法不存在。”
  • DynamoDB ConsistentRead用于全局索引
  • 如何在Golang中获取带引号的可打印字符串
  • 从image.RGBA实现io.Reader
  • 从net / html令牌生成器获取流中的当前位置
  • 如何通过Redis中的通配符获取所有值?
  • 如何将我的资源分成多个文件
  • 在Go gRPC处理程序中从客户端证书获取主题DN
  • 如果在AWS上使用golang生成的时间戳在本地系统上显示不同的日期时间
  • MongoDB:我是否应该一直保持全球会议?
  • 在Go中使用URL路由将URL路径与页面名称匹配的正确方法?
  • 将类型别名的变量传递给需要指向基础类型的指针的函数
  • 使用mgo使用Golang和MongoDB实现全文搜索
  • Zap堆栈跟踪与Google Cloud上的错误消息
  • 在远程计算机上执行WQL查询
  • 如何在具有类型接口的情况下向syncmap.Map添加条目
  • 突发数据处理的最佳EC2实例

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华