Documentation
¶
Overview ¶
Package workpool for do task in work pool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LogDebug log task run in which worker. LogDebug = false )
Functions ¶
This section is empty.
Types ¶
type Logger ¶ added in v1.10.4
type Logger interface {
Println(args ...interface{})
}
Logger log record interface
type Option ¶ added in v1.10.4
type Option func(p *Pool)
Option func Option to change pool
func WithLogger ¶ added in v1.10.4
WithLogger change logger entry.
func WithShutdownWait ¶ added in v1.10.4
WithShutdownWait change shutdown wait time.
func WithWaitTime ¶ added in v1.10.4
WithWaitTime close entry chan wait time.
func WithWorkerNum ¶ added in v1.10.4
WithWorkerNum change worker num.
type Pool ¶ added in v1.10.4
type Pool struct {
// contains filtered or unexported fields
}
Pool task work pool
func (*Pool) BatchAddTask ¶ added in v1.10.4
BatchAddTask batch add task to p.entryChan.
Click to show internal directories.
Click to hide internal directories.