Documentation ¶ Index ¶ func Add(f func()) error func Jobs() int func Size() int type TRunPool func New(limit ...int) *TRunPool func (p *TRunPool) Add(f func()) error func (p *TRunPool) Cap() int func (p *TRunPool) Close() func (p *TRunPool) IsClosed() bool func (p *TRunPool) Jobs() int func (p *TRunPool) Size() int Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Add ¶ func Add(f func()) error 添加工作方法到线程池 func Jobs ¶ func Jobs() int 获取池线程中所有工作方法数 func Size ¶ func Size() int 获取线程池当前线程数 Types ¶ type TRunPool ¶ type TRunPool struct { // contains filtered or unexported fields } func New ¶ func New(limit ...int) *TRunPool func (*TRunPool) Add ¶ func (p *TRunPool) Add(f func()) error 添加工作方法到线程池 func (*TRunPool) Cap ¶ func (p *TRunPool) Cap() int 获取线程池最大线程数 func (*TRunPool) Close ¶ func (p *TRunPool) Close() 关闭线程池 func (*TRunPool) IsClosed ¶ func (p *TRunPool) IsClosed() bool 检查线程池是否已关闭 func (*TRunPool) Jobs ¶ func (p *TRunPool) Jobs() int 获取池中当前工作方法数 func (*TRunPool) Size ¶ func (p *TRunPool) Size() int 获取线程池当前线程数 Source Files ¶ View all Source files xrun_pool.go Click to show internal directories. Click to hide internal directories.