Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Agzer0
Copy link
Contributor

@Agzer0 Agzer0 commented Feb 25, 2024

No description provided.

@gqcn
Copy link
Member

gqcn commented Feb 27, 2024

@Agzer0 Would you please give a brief description about your changes?

@Agzer0
Copy link
Contributor Author

Agzer0 commented Feb 28, 2024

Implemented the following changes for #3325:

  1. Used sync.Once to restrict Listen() so that it is executed only once, avoiding multiple executions of Listen() that could lead to repetitive triggering of handlers.
  2. Used waitChan to ensure that Listen() remains blocking.
  3. In AddSigHandlerShutdown() and AddSigHandler(), invoked signal.Notify() everytime so that even if signals are added after Listen(), they can still be registered and listened to.

@Agzer0 Agzer0 requested a review from gqcn February 29, 2024 13:01
@gqcn gqcn merged commit 849b104 into gogf:master Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants