Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskPool ¶
type TaskPool struct { TaskPoolOptions // contains filtered or unexported fields }
task pool: manage task ts
func (*TaskPool) AddTaskAlways ¶ added in v1.7.0
func (p *TaskPool) AddTaskAlways(t task)
AddTaskAlways add task to queues or do it immediately
func (*TaskPool) AddTaskBalance ¶ added in v1.7.0
func (p *TaskPool) AddTaskBalance(t task)
AddTaskBalance add task to idle queue do it immediately when no idle queue
type TaskPoolOption ¶
type TaskPoolOption func(*TaskPoolOptions)
func WithTaskPoolTaskPoolSize ¶
func WithTaskPoolTaskPoolSize(size int) TaskPoolOption
@size is the task queue pool size
func WithTaskPoolTaskQueueLength ¶
func WithTaskPoolTaskQueueLength(length int) TaskPoolOption
@length is the task queue length
func WithTaskPoolTaskQueueNumber ¶
func WithTaskPoolTaskQueueNumber(number int) TaskPoolOption
@number is the task queue number
type TaskPoolOptions ¶
type TaskPoolOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.