Documentation
¶
Index ¶
- func ContinuesGoRoutine(c context.Context, f func(x context.CancelFunc) time.Duration, ...) context.Context
- func GoRoutine(c context.Context, f func(), extra ...interface{}) context.Context
- func Register(hook RecoverHook)
- func Routine(f func(), extra ...interface{})
- func Try(a func() error, max time.Duration, extra ...interface{})
- type RecoverHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContinuesGoRoutine ¶
func ContinuesGoRoutine(c context.Context, f func(x context.CancelFunc) time.Duration, extra ...interface{}) context.Context
ContinuesGoRoutine is a safe go routine system with recovery, its continue after recovery
func GoRoutine ¶
GoRoutine is a safe go routine system with recovery and a way to inform finish of the routine
func Register ¶
func Register(hook RecoverHook)
Register is a way to register a hook to trigger after panic
Types ¶
type RecoverHook ¶
Click to show internal directories.
Click to hide internal directories.