package
0.0.0-20240201022239-0ae679bc1fb1
Repository: https://github.com/peakchen/go-zero.git
Documentation: pkg.go.dev
# Functions
GoSafe runs the given fn using another goroutine, recovers if fn panics.
NewRoutineGroup returns a RoutineGroup.
NewTaskRunner returns a TaskRunner.
NewWorkerGroup returns a WorkerGroup with given job and workers.
RoutineId is only for debug, never use it in production.
RunSafe runs the given fn, recovers if fn panics.
# Structs
A RoutineGroup is used to group goroutines together and all wait all goroutines to be done.
A TaskRunner is used to control the concurrency of goroutines.
A WorkerGroup is used to run given number of workers to process jobs.