Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RoutineGroup ¶
type RoutineGroup struct {
// contains filtered or unexported fields
}
func NewRoutineGroup ¶
func NewRoutineGroup() *RoutineGroup
func (*RoutineGroup) Run ¶
func (g *RoutineGroup) Run(fn func())
Don't reference the variables from outside, because outside variables can be changed by other goroutines
func (*RoutineGroup) RunSafe ¶
func (g *RoutineGroup) RunSafe(fn func())
Don't reference the variables from outside, because outside variables can be changed by other goroutines
func (*RoutineGroup) Wait ¶
func (g *RoutineGroup) Wait()
type TaskRunner ¶
type TaskRunner struct {
// contains filtered or unexported fields
}
func NewTaskRunner ¶
func NewTaskRunner(concurrency int) *TaskRunner
func (*TaskRunner) Schedule ¶
func (rp *TaskRunner) Schedule(task func())
type WorkerGroup ¶
type WorkerGroup struct {
// contains filtered or unexported fields
}
func NewWorkerGroup ¶
func NewWorkerGroup(job func(), workers int) WorkerGroup
func (WorkerGroup) Start ¶
func (wg WorkerGroup) Start()
Click to show internal directories.
Click to hide internal directories.