Skip to content

Commit

Permalink
comment update for g.Go
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Sep 11, 2023
1 parent 646e531 commit b99f001
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion frame/g/g_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ type (
// Go creates a new asynchronous goroutine function with specified recover function.
//
// The parameter `recoverFunc` is called when any panic during executing of `goroutineFunc`.
// If `recoverFunc` is not given or given nil, it ignores the panic from `goroutineFunc`.
// If `recoverFunc` is given nil, it ignores the panic from `goroutineFunc` and no panic will
// throw to parent goroutine.
func Go(ctx context.Context, goroutineFunc Func, recoverFunc RecoverFunc) {
gutil.Go(ctx, goroutineFunc, recoverFunc)
}
Expand Down
3 changes: 2 additions & 1 deletion util/gutil/gutil_goroutine.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ type RecoverFunc func(ctx context.Context, exception error)
// Go creates a new asynchronous goroutine function with specified recover function.
//
// The parameter `recoverFunc` is called when any panic during executing of `goroutineFunc`.
// If `recoverFunc` is not given or given nil, it ignores the panic from `goroutineFunc`.
// If `recoverFunc` is given nil, it ignores the panic from `goroutineFunc` and no panic will
// throw to parent goroutine.
func Go(ctx context.Context, goroutineFunc Func, recoverFunc RecoverFunc) {
if goroutineFunc == nil {
return
Expand Down

0 comments on commit b99f001

Please sign in to comment.