Documentation ¶
Index ¶
- type Executor
- func (s *Executor) AppendTask(tasks ...task)
- func (s *Executor) SetPanicHandler(panicHandler func(e interface{}))
- func (s *Executor) SetWorkers(workersCnt int)
- func (s *Executor) WaitAll() (allResults []taskResult)
- func (s *Executor) WaitFirstDone() (value interface{}, err error)
- func (s *Executor) WaitFirstSuccess() (value interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewBatchExecutor ¶
func NewBatchExecutor() *Executor
func (*Executor) AppendTask ¶
func (s *Executor) AppendTask(tasks ...task)
func (*Executor) SetPanicHandler ¶
func (s *Executor) SetPanicHandler(panicHandler func(e interface{}))
func (*Executor) SetWorkers ¶
func (*Executor) WaitFirstDone ¶
WaitFirstDone wait first done, value and err is the task returned.
func (*Executor) WaitFirstSuccess ¶
WaitFirstSuccess wait first success, value is the first success task's returned value, if all task fail, err is the last error.
Click to show internal directories.
Click to hide internal directories.