Documentation
¶
Index ¶
- Constants
- Variables
- type Parallel
- func (this *Parallel) Add(callback func() interface{}) error
- func (this *Parallel) Clear()
- func (this *Parallel) GracefulStop()
- func (this *Parallel) IsStopped() bool
- func (this *Parallel) Listen() (err error)
- func (this *Parallel) Run() map[int]interface{}
- func (this *Parallel) Stop()
- func (this *Parallel) Wait() (results map[int]interface{})
- type ParallelStatus
- type Workers
Constants ¶
View Source
const ( NORMAL = iota LISTENING STOPPED GRACEFUL_STOP )
Variables ¶
View Source
var (
StoppedError = errors.New("the process has stopped")
)
View Source
var (
WorkersStoppedError = errors.New("the process has stopped")
)
Functions ¶
This section is empty.
Types ¶
type Parallel ¶
type Parallel struct {
Callbacks []func() interface{}
// contains filtered or unexported fields
}
func NewParallel ¶
func (*Parallel) GracefulStop ¶ added in v1.3.0
func (this *Parallel) GracefulStop()
type ParallelStatus ¶ added in v1.3.0
type ParallelStatus int
type Workers ¶ added in v1.4.0
type Workers struct {
// contains filtered or unexported fields
}
func NewWorkers ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.