Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

gproc.signal enhance #3325

Closed
Agzer0 opened this issue Feb 25, 2024 · 0 comments
Closed

gproc.signal enhance #3325

Agzer0 opened this issue Feb 25, 2024 · 0 comments

Comments

@Agzer0
Copy link
Contributor

Agzer0 commented Feb 25, 2024

Package that You wish to enhance
signal funcs forgproc

Enhancement description

  1. 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.

  2. After the execution of Listen(), calling AddSigHandler() to add new custom signal handlers may fail to properly listen to the signals.

  3. 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

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant