threading

package
v0.0.0-...-9cc0b1b Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 3 Imported by: 0

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 GoroutineID

func GoroutineID() int64

GoroutineID Get returns the id of the current goroutine.

func Recover

func Recover(cleanups ...func())

Recover is used with defer to do cleanup on panics. Use it like:

defer Recover(func() {})

func RunSafe

func RunSafe(fn func())

RunSafe runs the given fn, recovers if fn panics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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