Documentation ¶
Index ¶
- Variables
- type Queue
- func (q *Queue) AddFunc(f func() error, priority int) (err error)
- func (q *Queue) AddGroup(tasks []Task) (err error)
- func (q *Queue) AddTask(task Task) (err error)
- func (q *Queue) Len() int
- func (q *Queue) Start(numWorkers int) (err error)
- func (q *Queue) Stop()
- func (q *Queue) TaskRunning() int
- func (q *Queue) WaitFunc(f func() error, priority int) (err error)
- func (q *Queue) WaitGroup(tasks []Task) (err error)
- func (q *Queue) WaitTask(task Task) (err error)
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrQueueAlreadyStarted = fmt.Errorf("Queue already started")
View Source
var ErrQueueNotStarted = fmt.Errorf("Queue not started or closed")
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) Stop ¶
func (q *Queue) Stop()
Stopping queue. Wait while all workers finish current tasks
func (*Queue) TaskRunning ¶
How much workers do work at this moment
Click to show internal directories.
Click to hide internal directories.