mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 09:51:02 +00:00
Fixes #364
This commit is contained in:
commit
3196233d2d
@ -55,7 +55,9 @@ type Options struct {
|
|||||||
Nonblocking bool
|
Nonblocking bool
|
||||||
|
|
||||||
// PanicHandler is used to handle panics from each worker goroutine.
|
// PanicHandler is used to handle panics from each worker goroutine.
|
||||||
// if nil, panics will be thrown out again from worker goroutines.
|
// If nil, the default behavior is to capture the value given to panic
|
||||||
|
// and resume normal execution and print that value along with the
|
||||||
|
// stack trace of the goroutine
|
||||||
PanicHandler func(any)
|
PanicHandler func(any)
|
||||||
|
|
||||||
// Logger is the customized logger for logging info, if it is not set,
|
// Logger is the customized logger for logging info, if it is not set,
|
||||||
@ -66,7 +68,7 @@ type Options struct {
|
|||||||
DisablePurge bool
|
DisablePurge bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithOptions accepts the whole options config.
|
// WithOptions accepts the whole Options config.
|
||||||
func WithOptions(options Options) Option {
|
func WithOptions(options Options) Option {
|
||||||
return func(opts *Options) {
|
return func(opts *Options) {
|
||||||
*opts = options
|
*opts = options
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user