Documentation ¶
Overview ¶
Package workpool for do task in work pool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoggerFunc ¶
type LoggerFunc func(...interface{})
LoggerFunc is a bridge between Logger and any third party logger.
func (LoggerFunc) Println ¶
func (f LoggerFunc) Println(args ...interface{})
Println implements Logger interface.
type Option ¶
type Option func(p *Pool)
Option func Option to change pool.
func WithEntryCloseWait ¶
WithEntryCloseWait close entry chan entryCloseWait time.
func WithExecInterval ¶
WithExecInterval interval time after each task is executed.
func WithShutdownWait ¶
WithShutdownWait change shutdown entryCloseWait time.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool task work pool
func (*Pool) BatchAddTask ¶
BatchAddTask batch add task to p.entryChan.
Click to show internal directories.
Click to hide internal directories.