Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCanceled = context.Canceled ErrTimeout = context.DeadlineExceeded )
Functions ¶
func DoWithTimeout ¶
Types ¶
type FxOption ¶
func WithContext ¶
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())
Click to show internal directories.
Click to hide internal directories.