safe

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Func

func Func(where string, f func())

Func 安全的执行f函数,如果panic会自动捕获

func Go

func Go(where string, f func())

Go 安全执行 f 函数

func LoopFunc

func LoopFunc(where string, f func())

LoopFunc 循环执行函数,直到其正常退出.通常用于f函数需要循环执行,被异常中止后继续重复执行

func LoopGo

func LoopGo(where string, f func())

LoopGo 在新的goroutine中使用LoopFunc执行 f函数

func RecoverPanic

func RecoverPanic(where string, after ...func())

Types

This section is empty.

Jump to

Keyboard shortcuts

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