Golang package sync 剖析(三):sync.Cond

2020-02-01
阅读 5 分钟
4k
上一期中,我们介绍了如何使用 sync.WaitGroup 提高程序的并行度。本期文章我们介绍 package sync 下的另一个工具类:sync.Cond。

Golang package sync 剖析(二): sync.WaitGroup

2020-01-28
阅读 6 分钟
3.4k
上一期中,我们介绍了 sync.Once 如何保障 exactly once 语义,本期文章我们介绍 package sync 下的另一个工具类:sync.WaitGroup。

Golang package sync 剖析(一): sync.Once

2020-01-27
阅读 3 分钟
6.4k
Go语言在设计上对同步(Synchronization,数据同步和线程同步)提供大量的支持,比如 goroutine和channel同步原语,库层面有