Documentation ¶
Overview ¶
*
- Copyright 2020 gd Author. All rights reserved.
- Author: Chuck1024
*
- Copyright 2020 gd Author. All rights reserved.
- Author: Chuck1024
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TIMTOUR_Err = fmt.Errorf("insert into gouroutine pool timeout")
Functions ¶
This section is empty.
Types ¶
type FixedGoroutinePool ¶
type FixedGoroutinePool struct { Size int64 // contains filtered or unexported fields }
func (*FixedGoroutinePool) Close ¶
func (f *FixedGoroutinePool) Close()
func (*FixedGoroutinePool) Execute ¶
func (f *FixedGoroutinePool) Execute(function func())
func (*FixedGoroutinePool) ExecuteWithArg ¶
func (f *FixedGoroutinePool) ExecuteWithArg(function func(args ...interface{}), arg ...interface{})
func (*FixedGoroutinePool) Start ¶
func (f *FixedGoroutinePool) Start() error
type FixedGoroutinePoolTimeout ¶
type FixedGoroutinePoolTimeout struct { Size int64 Timeout time.Duration // contains filtered or unexported fields }
func (*FixedGoroutinePoolTimeout) Close ¶
func (f *FixedGoroutinePoolTimeout) Close()
func (*FixedGoroutinePoolTimeout) Execute ¶
func (f *FixedGoroutinePoolTimeout) Execute(function func()) error
func (*FixedGoroutinePoolTimeout) Start ¶
func (f *FixedGoroutinePoolTimeout) Start() error
type GoRoutinePoolWithConfig ¶
type GoRoutinePoolWithConfig struct { DefaultSize int64 ReservedConfig map[string]int64 // contains filtered or unexported fields }
func (*GoRoutinePoolWithConfig) Close ¶
func (g *GoRoutinePoolWithConfig) Close()
func (*GoRoutinePoolWithConfig) ExecuteDefault ¶
func (g *GoRoutinePoolWithConfig) ExecuteDefault(function func())
func (*GoRoutinePoolWithConfig) ExecuteKey ¶
func (g *GoRoutinePoolWithConfig) ExecuteKey(key string, function func())
func (*GoRoutinePoolWithConfig) Start ¶
func (g *GoRoutinePoolWithConfig) Start() error
type StopAbleTask ¶ added in v1.7.10
type StopAbleTask interface {
Close()
}
* Notice: 1. it use lock to make sure taskList is correct. performance is bad 2. still able to add task after WaitStopAll, so you should make sure no extra task is running after called WaitStopAll
type StopAbleTaskGroup ¶ added in v1.7.10
type StopAbleTaskGroup struct {
// contains filtered or unexported fields
}
func NewStopAbleTaskGroup ¶ added in v1.7.10
func NewStopAbleTaskGroup() *StopAbleTaskGroup
func (*StopAbleTaskGroup) AddTask ¶ added in v1.7.10
func (s *StopAbleTaskGroup) AddTask(task StopAbleTask)
func (*StopAbleTaskGroup) Close ¶ added in v1.7.10
func (s *StopAbleTaskGroup) Close()
func (*StopAbleTaskGroup) Start ¶ added in v1.7.10
func (s *StopAbleTaskGroup) Start() error
func (*StopAbleTaskGroup) WaitStopAll ¶ added in v1.7.10
func (s *StopAbleTaskGroup) WaitStopAll()
Click to show internal directories.
Click to hide internal directories.