You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/07/17 07:13:44 UTC

[GitHub] [dubbo-go] Mulavar commented on issue #1321: 为什么使用`func () cluster.LoadBalance` 作为入参?

Mulavar commented on issue #1321:
URL: https://github.com/apache/dubbo-go/issues/1321#issuecomment-881847267


   > 1. 为什么现在这么做:使用工厂函数的原因就是防止一个实例被多次使用,如果用户定义的实例内有map字段,会造成线程安全问题,多个地方都会改动同一个实例也会造成逻辑错乱。
   > 2. 现有工厂函数并没有提供入参,这的确不好。我认为这一点需要针对3.0重新定义。给一个用户可扩展参数metaadata,类型可以是interface。
   >    @JiaLiangoooo 您觉得如何。
   
   再补充一下,关于第一点我们的讨论是如果额外提供注册单例实例的方式目前会有增一些复杂度,所以我们更加倾向于在第二点上为用户提高易用性,欢迎您任何宝贵的意见。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org