package
Version:
v0.0.0-...-9f09256
Opens a new window with list of versions in this module.
Published: Feb 8, 2023
License: GPL-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
简介
workpool
限流器
使用
# work_num 任务并发数(工作数)
dispathcher := NewDispathcher(num int)
# job 接口
dispathcher.AddJob(job)
dispathcher.Stop()
Documentation
¶
func NewDispathcher(num int) *dispathcherImpl
type Dispathcher interface {
AddJob(Job)
Stop()
}
type Job interface {
Execute()
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.