Skip to content

gopool.go #3

@timeisgoing

Description

@timeisgoing

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions