Documentation ¶
Overview ¶
Package grpool implements a goroutine reusable pool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Goroutine Pool
func New ¶
New creates and returns a new goroutine pool object. The param <limit> is used to limit the max goroutine count, which is not limited in default.
func (*Pool) Add ¶
func (p *Pool) Add(f func())
Add pushes a new job to the pool. The job will be executed asynchronously.
Click to show internal directories.
Click to hide internal directories.