package
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Aug 29, 2022
License: Apache-2.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
¶
Pool 协程池
NewPool 初始化线程池
number 协程数
size 单协程任务数量
ctx 上下文变量
func (pool *Pool[T]) Add(task T)
Add 添加任务
func (pool *Pool[T]) Start()
Start 启动协程池
func (pool *Pool[T]) Stop()
Stop 关闭协程池
type RunTimeErr interface {
Catch()
}
RunTimeErr 协程池运行错误捕捉接口
Source Files
¶
Click to show internal directories.
Click to hide internal directories.