//
pkg.gl
Category
github.com/silentred/toolkit
util
grpool
package
0.1.5
Repository:
https://github.com/silentred/toolkit.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
6
Dependents
0
Files
198 SLOC
#
Functions
Add
添加异步任务(使用默认的池对象).
Jobs
查询当前等待处理的任务总数.
New
创建goroutine池管理对象,给定过期时间(秒) 第二个参数用于限制限制最大的goroutine数量/线程数/worker数量,非必需参数,默认不做限制.
SetExpire
动态改变默认池中goroutine的过期时间.
SetSize
动态改变默认池中goroutine的上线数量.
Size
查询当前goroutine总数.
#
Structs
Pool
goroutine池对象.
PoolJob
goroutine任务.