Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkHandler ¶
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
func NewWorkerPool ¶
func NewWorkerPool(size int, o ...Option) *WorkerPool
func (*WorkerPool) Close ¶
func (pool *WorkerPool) Close()
func (*WorkerPool) Run ¶
func (pool *WorkerPool) Run(task TaskFunc)
func (*WorkerPool) RunContext ¶
func (pool *WorkerPool) RunContext(ctx context.Context, task TaskFunc) error
func (*WorkerPool) TryRun ¶
func (pool *WorkerPool) TryRun(task TaskFunc) bool
Click to show internal directories.
Click to hide internal directories.