thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar <>
Subject need client socket pool?
Date Fri, 22 May 2009 14:05:48 GMT
Hi all,

In our project we need call RPCs in different threads.

//pseudo code

void init()
  //initialize the transport and protocol

void threadA()
//call rpc a using the initialized client

void threadB()
//call rpc b using the initialized client

The above code has the race-condition problem.

My question is: lock the client directly or make a client socket pool?

What's your opinion?

View raw message