V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
asanelder
V2EX  ›  程序员

thrift 的 TServiceClient 是线程安全的么?

  •  
  •   asanelder · 2021-04-22 18:16:55 +08:00 · 974 次点击
    这是一个创建于 1097 天前的主题,其中的信息可能已经有所发展或是发生改变。
    想多线程下使用同一个 TServiceClient, 但看

    https://stackoverflow.com/questions/37674466/how-to-make-a-thrift-client-for-multiple-threads

    说并不是安全的. 网上其它资料也没多少.

    铁子们有知道内情的么?
    2 条回复    2021-04-23 18:49:34 +08:00
    xkeyideal
        1
    xkeyideal  
       2021-04-22 18:29:50 +08:00
    非线程安全
    blackbeans
        2
    blackbeans  
       2021-04-23 18:49:34 +08:00
    得搞一个连接池。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1072 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:33 · PVG 06:33 · LAX 15:33 · JFK 18:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.