Go sync.Cond

[该文章转载自极客兔: geektutu.com](https://geektutu.com/post/hpg-sync-cond.html "转载自极客兔 geektutu.com") > 源代码/数据集已上传到 [Github - high-performance-go](https://github.com/geektutu/high-performance-go) ![hig

- 阅读全文 -

GO语言-按树形结构打印二叉树

```Go type TreeNode struct { Val int Left, Right *TreeNode } func getTreeDepth(root *TreeNode) int { if root == nil { return 0 } return 1 + int(math.Max(float64(getTreeDepth(

- 阅读全文 -

如何优雅地关闭 channel

[原文: 08 - 如何优雅地关闭 channel](https://qcrao91.gitbook.io/go/channel/ru-he-you-ya-di-guan-bi-channel "原文: 08 - 如何优雅地关闭 channel") 关于 channel 的使用,有几点不方便的地方: - 1.在不改变 channel 自身状态的情况下,无法获知一个 channel

- 阅读全文 -

Go进阶—并发编程 Mutex

[转自:【Go进阶—并发编程】Mutex https://segmentfault.com/a/1190000041467918](https://segmentfault.com/a/1190000041467918 "【Go进阶—并发编程】Mutex") 总结来说,GO语言中mutex的两种模式(正常模式和饥饿模式)的主要区别在于对等待锁的goroutine的优先级处理上: 正常模

- 阅读全文 -

Golang垃圾回收(GC) 底层原理

参考链接: [Golang垃圾回收(GC)介绍 ](https://liangyaopei.github.io/2021/01/02/golang-gc-intro/ "Golang垃圾回收(GC)介绍") [刘丹冰Aceld Golang中GC回收机制三色标记与混合写屏障](https://www.bilibili.com/video/BV1wz4y1y7Kd?p=14&vd_sourc

- 阅读全文 -