MinatoWu commented on code in PR #2992:
URL: https://github.com/apache/dubbo-go/pull/2992#discussion_r2329081399
##########
loader.go:
##########
@@ -39,11 +43,15 @@ import (
import (
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/constant/file"
+ "dubbo.apache.org/dubbo-go/v3/common/extension"
)
var (
defaultActive = "default"
instanceOptions = defaultInstanceOptions()
+ once sync.Once
+ stopCh = make(chan struct{})
+ watcherWg sync.WaitGroup
Review Comment:
> yeah, can not agree with you more.
Thanks for the suggestion—given our single watcher and Once/stopOnce guards,
this is safe; we’ll consider encapsulation if we later support multiple or
restartable watchers
--
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]