safegroup

package
v0.0.54 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PanicBufLen = 2048

PanicBufLen panic stack buffer max size.

Functions

This section is empty.

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

Group secure group.

func WithContext

func WithContext(ctx context.Context) (*Group, context.Context)

WithContext returns a new Group and an associated Context derived from ctx.

func (*Group) Go

func (s *Group) Go(f func() error)

Go calls the given function in a new goroutine. If a panic occurred in a given function, it will be captured and error will be returned. At the same time, the goroutine stack information will be printed to standard output.

func (*Group) Wait

func (s *Group) Wait() error

Wait blocks until all function calls from the Go method have returned, then returns the first non-nil error (if any) from them.

Jump to

Keyboard shortcuts

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