You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WithPanicHandler was first introduced by #23 and the behavior matched the docs, but the behavior had been changed since this commit and I forgot to update the docs. Thanks for pointing it out!
If I want to detect a panic (or propagate panic to main process) after Invoke called, should I use WithPanicHandler with own implementations?
As for your use case, yes, you can call panic in your PanicHandler.
Questions with details
Hi! My team uses ants a lot. Thanks for a great product!
Document of
Options.PanicHandler
said below 1In the actual implementation, if PanicHandler is nil, it appears to be suppressed after logging output. 2
If I want to detect a panic (or propagate panic to main process) after
Invoke
called, should I useWithPanicHandler
with own implementations?Code snippets (optional)
Footnotes
https://github.com/panjf2000/ants/blob/a44594205e16818434d27f02da3f81c26e51a74a/options.go#L57-L58 ↩
https://github.com/panjf2000/ants/blob/a44594205e16818434d27f02da3f81c26e51a74a/worker_func.go#L62 ↩
The text was updated successfully, but these errors were encountered: