threadpkg

package
v0.3.33 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoSafe

func GoSafe(fn func())

GoSafe runs the given fn using another goroutine, recovers if fn panics.

func GoSafeWithContext added in v0.3.31

func GoSafeWithContext(ctx context.Context, fn func(ctx context.Context))

GoSafeWithContext ...

func Recover

func Recover(ctx context.Context)

Recover is used with defer to do cleanup on panics. Use it like: defer Recover(func() {})

Types

This section is empty.

Jump to

Keyboard shortcuts

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