Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool is a fixed-size worker pool. N goroutines are started at creation and pull work from an internal channel. Submit never blocks unless the queue is full — and the queue is buffered to queueSize.
func NewPool ¶
NewPool creates a pool with n persistent workers and a buffered work queue. If queueSize <= 0 it defaults to n*4.
func NewPoolContext ¶
NewPoolContext creates a pool with n persistent workers and a buffered work queue. If queueSize <= 0 it defaults to n*4.
Click to show internal directories.
Click to hide internal directories.