context.Background()
context.Background() 返回一个空的Context
我们可以用这个 空的 Context 作为 goroutine 的root 节点(如果把整个 goroutine 的关系看作 树状)
使用context.WithCancel(parent)函数,创建一个可取消的子Context
函数返回值有两个:子Context Cancel 取消函数
例如:
ctx, cancel := context.WithCancel(context.Background())