-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gproc.signal enhance #3325
Labels
Comments
Agzer0
added a commit
to Agzer0/gf
that referenced
this issue
Feb 25, 2024
gqcn
pushed a commit
that referenced
this issue
Mar 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Package that You wish to enhance
signal funcs for
gproc
Enhancement description
The Listen() method should be executed only once. In business encapsulation, signal listening might be called in different packages, and there could be multiple calls to Listen() (typically done in a goroutine), resulting in the handlers being registered and executed multiple times.
After the execution of Listen(), calling AddSigHandler() to add new custom signal handlers may fail to properly listen to the signals.
If Listen() is called in one goroutine, and then AddSigHandler()/AddSigHandlerShutdown() is called in another goroutine, it may lead to data race issues, primarily due to the signalHandlerMap, an internal variable of type map.
Additional
The text was updated successfully, but these errors were encountered: