1

Is the the client in Twitter Finagle thread-safe ? I don't want to call newClient in each RPC function (I think it will make a new connection to destination end, is it?) So it seems that re-using the same client object is a good choice. But, because the RPC functions may be called by diff threads at the same time, is it safe to use the same Finagle client object ?

hl1020
  • 529
  • 5
  • 11

1 Answers1

3

This is client-specific. All clients exported by Finagle are thread-safe, but your own clients may not be if you don't design them to be.

  • Thanks! I mean the clients exported by Finagle. I have read through the doc (http://twitter.github.io/finagle/guide/Clients.html),but cannot find any useful information about the thread-safe stuff. – hl1020 Dec 30 '14 at 15:23