• 请不要在回答技术问题时复制粘贴 AI 生成的内容
asanelder
V2EX  ›  程序员

thrift 的 TServiceClient 是线程安全的么?

  •  
  •   asanelder · Apr 22, 2021 · 2110 views
    This topic created in 2038 days ago, the information mentioned may be changed or developed.
    想多线程下使用同一个 TServiceClient, 但看

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

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

    铁子们有知道内情的么?
    2 replies  •  2021-04-23 18:49:34 +08:00
    xkeyideal
    xkeyideal
    Apr 22, 2021
    1
    非线程安全
    blackbeans
    blackbeans
    Apr 23, 2021
    2
    得搞一个连接池。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2394 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 03:18 · PVG 11:18 · LAX 19:18 · JFK 22:18
    ♥ Do have faith in what you're doing.