Documentation ¶
Index ¶
Constants ¶
View Source
const ( Running = iota Pending Over Idle )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LimitRoutinePool ¶
type LimitRoutinePool struct { *RoutinePool // contains filtered or unexported fields }
func NewLimitPool ¶
func NewLimitPool(count int, limit int, notice func()) *LimitRoutinePool
type RoutinePool ¶
type RoutinePool struct { RunningSheet map[string]*GoWorker IdleSheet map[string]*GoWorker RunningChan chan *GoWorker IdleChan chan *GoWorker StatusChan chan *GoWorker TaskFuncChan chan TaskFunc // contains filtered or unexported fields }
func NewPool ¶
func NewPool(count int) *RoutinePool
func (*RoutinePool) GetRunningCount ¶
func (r *RoutinePool) GetRunningCount() int
func (*RoutinePool) Pause ¶
func (r *RoutinePool) Pause()
func (*RoutinePool) Recover ¶
func (r *RoutinePool) Recover()
func (*RoutinePool) Release ¶
func (r *RoutinePool) Release()
func (*RoutinePool) Start ¶
func (r *RoutinePool) Start()
func (*RoutinePool) Submit ¶
func (r *RoutinePool) Submit(task TaskFunc)
Click to show internal directories.
Click to hide internal directories.