safer

package
v0.0.0-...-8bd0779 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoSafely

func GoSafely(wg *sync.WaitGroup, ignoreRecover bool, handler func(), catchFunc func(r interface{}), w io.Writer)

GoSafely WaitGroup wraps a `go func()` with recover()

func GoUnterminated

func GoUnterminated(handle func(), wg *sync.WaitGroup, ignoreRecover bool, period time.Duration, w io.Writer)

GoUnterminated is used for which goroutine wanna long live as its process. @period: sleep time duration after panic to defeat @handle panic so frequently. if it is not positive,

the @handle will be invoked asap after panic.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL