Golang Context包 详解

context 主要用来在 goroutine 之间传递上下文信息,包括:取消信号、超时时间、截止时间、k-v 等。

context 用来解决 goroutine 之间退出通知元数据传递的功能。

阅读更多