Documentation ¶
Index ¶
- func AddCancel(cancel func()) (ctx context.Context)
- func AddCloser(c closeFunc)
- func DebugString() string
- func GoWork(f func())
- func IsStopped() <-chan struct{}
- func LogPanic(r interface{})
- func RunWork(name string, f func() error, panicHandler ...func(interface{})) error
- func RunWorkAsync(name string, f func(), panicHandler ...func(interface{})) error
- func RunWorkDaemon(name string, f func(), quit <-chan struct{}) error
- func ShouldStop() <-chan struct{}
- func Stop() error
- func WorkNum() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoWork ¶
func GoWork(f func())
GoWork execute the f function in a routine, The routine is reused.
func RunWorkAsync ¶
RunWorkAsync run the func in new routine
func RunWorkDaemon ¶
RunWorkDaemon run the func in new routine and run until stop
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.