package
Version:
v0.0.0-...-1272ae6
Opens a new window with list of versions in this module.
Published: Jul 17, 2020
License: GPL-3.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Pool struct {
EntryChan chan *Task
WorkerNum int
JobsChan chan *Task
}
返回一个协程池
@param cap 协程池中Goroutine的数量
让协程池Pool开始工作
@param ctx 上下文
协程池创建一个worker并且开始工作
@param workID Goroutine编号
@param ctx 上下文
WorkPool中执行的任务
返回一个任务
@param task 任务类型
@param HandleFunc 处理函数
func (this *Task) Execute()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.