Documentation
¶
Index ¶
- Constants
- type RoutinePool
- func (p *RoutinePool) Clear()
- func (p *RoutinePool) GetSingleResult() *fuzzTypes.Reaction
- func (p *RoutinePool) Pause()
- func (p *RoutinePool) RegisterExecutor(executor func(*fuzzCtx.TaskCtx) *fuzzTypes.Reaction, which int8)
- func (p *RoutinePool) ReleaseSelf()
- func (p *RoutinePool) Resize(size int)
- func (p *RoutinePool) Resume()
- func (p *RoutinePool) Start()
- func (p *RoutinePool) Status() int8
- func (p *RoutinePool) Stop()
- func (p *RoutinePool) Submit(execArg *fuzzCtx.TaskCtx, whichExec int8, timeout time.Duration) bool
- func (p *RoutinePool) Wait(maxTime time.Duration) bool
- func (p *RoutinePool) WaitResume()
Constants ¶
View Source
const ( StatStop = 0 StatRunning = 1 StatPause = 2 ExecMajor = int8(0) ExecMinor = int8(1) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoutinePool ¶
type RoutinePool struct {
// contains filtered or unexported fields
}
func NewRp ¶ added in v0.2.0
func NewRp(concurrency int) (*RoutinePool, error)
NewRp 从协程池对象池中取出一个并发数为concurrency的rp
func (*RoutinePool) GetSingleResult ¶
func (p *RoutinePool) GetSingleResult() *fuzzTypes.Reaction
GetSingleResult 获取单个任务结果
func (*RoutinePool) RegisterExecutor ¶ added in v0.2.0
func (p *RoutinePool) RegisterExecutor(executor func(*fuzzCtx.TaskCtx) *fuzzTypes.Reaction, which int8)
RegisterExecutor 注册任务执行函数,如果协程池是运行状态,或注册下标不为ExecMinor或ExecMajor,则退出 特别注意:协程池在运行状态时是不能调用此函数的,必须先暂停
func (*RoutinePool) ReleaseSelf ¶ added in v0.2.0
func (p *RoutinePool) ReleaseSelf()
ReleaseSelf 将自身放入池中
func (*RoutinePool) Resize ¶
func (p *RoutinePool) Resize(size int)
func (*RoutinePool) Status ¶
func (p *RoutinePool) Status() int8
func (*RoutinePool) WaitResume ¶ added in v0.2.0
func (p *RoutinePool) WaitResume()
Click to show internal directories.
Click to hide internal directories.