leno23 opened a new pull request, #3388:
URL: https://github.com/apache/dubbo-go/pull/3388

   ### Description
   
   Refs #3248.
   
   This PR continues the extension safety cleanup by moving protocol-level 
graceful shutdown callbacks from a hand-rolled `map + RWMutex` to the shared 
generic `Registry[T]` abstraction:
   
   - adds `Registry.RegisterIfAbsent` for atomic duplicate-preserving 
registration
   - uses `Registry[GracefulShutdownCallback]` for graceful shutdown callback 
lookup/unregister/snapshot
   - keeps the existing duplicate registration behavior: the first callback 
remains registered and later duplicates are ignored with a warning
   
   ### Validation
   
   - `go test ./common/extension`
   - `go test -race ./common/extension`
   - `make fmt`
   - `git diff --check`
   
   ### Checklist
   
   - [x] Code has passed local testing
   - [x] I have added tests that prove my fix is effective or that my feature 
works
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to