Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrScheduleTimeout = fmt.Errorf("schedule error: timed out")
ErrScheduleTimeout returned by Pool to indicate that there no free goroutines during some period of time.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool contains logic of goroutine reuse.
func NewPool ¶
NewPool creates new goroutine pool with given size. It also creates a work queue of given size. Finally, it spawns given amount of goroutines immediately.
Click to show internal directories.
Click to hide internal directories.