Documentation
¶
Index ¶
- Variables
- type Future
- type FutureResult
- type NoChanPool
- func (pool *NoChanPool) AddCurrentWorkingCnt(value int64) int64
- func (pool *NoChanPool) AddMaxWorkerCnt(value int64) int64
- func (pool *NoChanPool) AddWorkerCnt(value int64) int64
- func (pool *NoChanPool) CompareAndSwapCurrentWorkingCnt(oldValue, newValue int64) bool
- func (pool *NoChanPool) Execute(t Task)
- func (pool *NoChanPool) ExecuteFunc(f func() interface{})
- func (pool *NoChanPool) GetCurrentWorkingCnt() int64
- func (pool *NoChanPool) GetMaxWorkerCnt() int64
- func (pool *NoChanPool) GetWorkerCnt() int64
- func (pool *NoChanPool) ShutDown()
- func (pool *NoChanPool) Submit(t Task) (Future, error)
- func (pool *NoChanPool) SubmitFunc(f func() interface{}) (Future, error)
- type Pool
- type RoutinePool
- func (pool *RoutinePool) AddCurrentWorkingCnt(value int64) int64
- func (pool *RoutinePool) AddMaxWorkerCnt(value int64) int64
- func (pool *RoutinePool) AddWorkerCnt(value int64) int64
- func (pool *RoutinePool) CompareAndSwapCurrentWorkingCnt(oldValue, newValue int64) bool
- func (pool *RoutinePool) Execute(t Task)
- func (pool *RoutinePool) ExecuteFunc(f func() interface{})
- func (pool *RoutinePool) GetCurrentWorkingCnt() int64
- func (pool *RoutinePool) GetMaxWorkerCnt() int64
- func (pool *RoutinePool) GetWorkerCnt() int64
- func (pool *RoutinePool) ShutDown()
- func (pool *RoutinePool) Submit(t Task) (Future, error)
- func (pool *RoutinePool) SubmitFunc(f func() interface{}) (Future, error)
- func (pool *RoutinePool) SubmitWithTimeout(t Task, timeout int64) (Future, error)
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var PoolShutDownError = errors.New("RoutinePool is shutdown!")
View Source
var SubmitTimeoutError = errors.New("Submit task timeout!")
View Source
var TaskInvalid = errors.New("Task is nil!")
View Source
var TaskRejectError = errors.New("Submit task is rejected!")
Functions ¶
This section is empty.
Types ¶
type FutureResult ¶
type FutureResult struct {
// contains filtered or unexported fields
}
func (*FutureResult) Get ¶
func (f *FutureResult) Get() interface{}
type NoChanPool ¶
type NoChanPool struct {
// contains filtered or unexported fields
}
func (*NoChanPool) AddCurrentWorkingCnt ¶
func (*NoChanPool) AddMaxWorkerCnt ¶
func (*NoChanPool) AddWorkerCnt ¶
func (*NoChanPool) CompareAndSwapCurrentWorkingCnt ¶
func (*NoChanPool) Execute ¶
func (pool *NoChanPool) Execute(t Task)
func (*NoChanPool) ExecuteFunc ¶
func (pool *NoChanPool) ExecuteFunc(f func() interface{})
func (*NoChanPool) GetCurrentWorkingCnt ¶
func (pool *NoChanPool) GetCurrentWorkingCnt() int64
func (*NoChanPool) GetMaxWorkerCnt ¶
func (pool *NoChanPool) GetMaxWorkerCnt() int64
func (*NoChanPool) GetWorkerCnt ¶
func (pool *NoChanPool) GetWorkerCnt() int64
func (*NoChanPool) ShutDown ¶
func (pool *NoChanPool) ShutDown()
func (*NoChanPool) SubmitFunc ¶
func (pool *NoChanPool) SubmitFunc(f func() interface{}) (Future, error)
type Pool ¶
type Pool interface {
ShutDown()
Submit(t Task) (Future, error)
SubmitFunc(f func() interface{}) (Future, error)
Execute(t Task)
ExecuteFunc(f func() interface{})
GetMaxWorkerCnt() int64
AddMaxWorkerCnt(value int64) int64
GetCurrentWorkingCnt() int64
AddCurrentWorkingCnt(value int64) int64
GetWorkerCnt() int64
AddWorkerCnt(value int64) int64
}
func NewNochanPool ¶
func NewRoutinePool ¶
type RoutinePool ¶
type RoutinePool struct {
// contains filtered or unexported fields
}
func (*RoutinePool) AddCurrentWorkingCnt ¶
func (*RoutinePool) AddMaxWorkerCnt ¶
func (pool *RoutinePool) AddMaxWorkerCnt(value int64) int64
func (*RoutinePool) AddWorkerCnt ¶
func (*RoutinePool) CompareAndSwapCurrentWorkingCnt ¶
func (*RoutinePool) Execute ¶
func (pool *RoutinePool) Execute(t Task)
func (*RoutinePool) ExecuteFunc ¶
func (pool *RoutinePool) ExecuteFunc(f func() interface{})
func (*RoutinePool) GetCurrentWorkingCnt ¶
func (pool *RoutinePool) GetCurrentWorkingCnt() int64
func (*RoutinePool) GetMaxWorkerCnt ¶
func (pool *RoutinePool) GetMaxWorkerCnt() int64
func (*RoutinePool) GetWorkerCnt ¶
func (pool *RoutinePool) GetWorkerCnt() int64
func (*RoutinePool) ShutDown ¶
func (pool *RoutinePool) ShutDown()
func (*RoutinePool) SubmitFunc ¶
func (pool *RoutinePool) SubmitFunc(f func() interface{}) (Future, error)
func (*RoutinePool) SubmitWithTimeout ¶
func (pool *RoutinePool) SubmitWithTimeout(t Task, timeout int64) (Future, error)
Click to show internal directories.
Click to hide internal directories.