Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DoWorkFunc ¶
func (DoWorkFunc) DoWork ¶
func (f DoWorkFunc) DoWork(ctx context.Context, args ...interface{})
type Work ¶
type Work struct {
// contains filtered or unexported fields
}
func NewWorkFunc ¶
func NewWorkFunc(doworkfn DoWorkFunc, args ...interface{}) *Work
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
func NewWorkerPool ¶
func NewWorkerPool(works int) *WorkerPool
func (*WorkerPool) PutBlocking ¶
func (wp *WorkerPool) PutBlocking(work *Work)
func (*WorkerPool) PutWithContext ¶
func (wp *WorkerPool) PutWithContext(ctx context.Context, work *Work)
func (*WorkerPool) Start ¶
func (wp *WorkerPool) Start(ctx context.Context)
func (*WorkerPool) Stop ¶
func (wp *WorkerPool) Stop()
Click to show internal directories.
Click to hide internal directories.