Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Meta ¶
type Meta struct {
// contains filtered or unexported fields
}
Meta is a container that can control or watch the task in the pool.
func (*Meta) GetExitCh ¶
func (m *Meta) GetExitCh() chan struct{}
GetExitCh is to get the exit channel.
type TaskManager ¶
type TaskManager struct {
// contains filtered or unexported fields
}
TaskManager is a manager that can control or watch the pool.
func NewTaskManager ¶
func NewTaskManager(c int32) TaskManager
NewTaskManager create a new pool task manager.
func (*TaskManager) DeleteTask ¶
func (t *TaskManager) DeleteTask(taskID uint64)
DeleteTask delete a task from the manager.
func (*TaskManager) Downclock ¶
func (t *TaskManager) Downclock()
Downclock is to decrease the concurrency of pool.
func (*TaskManager) GetOriginConcurrency ¶
func (t *TaskManager) GetOriginConcurrency() int32
GetOriginConcurrency return the concurrency of the pool at the init.
func (*TaskManager) Overclock ¶
func (t *TaskManager) Overclock() (tid uint64, task *Meta)
Overclock is to increase the concurrency of pool.
func (*TaskManager) RegisterTask ¶
func (t *TaskManager) RegisterTask(task *Meta)
RegisterTask register a task to the manager.
type TaskStatusContainer ¶
type TaskStatusContainer struct {
// contains filtered or unexported fields
}
TaskStatusContainer is a container that can control or watch the pool.
Click to show internal directories.
Click to hide internal directories.