在 Go(task func())中task已经放入 p.queue 了,为何还要go p.worker(task) 当作参数传入呢? worker(task func())方法中task() 和task = <-p.queue会不会同一个task执行了两次呢?
在 Go(task func())中task已经放入 p.queue 了,为何还要go p.worker(task) 当作参数传入呢?
worker(task func())方法中task() 和task = <-p.queue会不会同一个task执行了两次呢?