thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schmitt <c.schm...@envisia.de>
Subject Re: How to make a Thrift client for multiple threads?
Date Tue, 07 Jun 2016 16:03:24 GMT
Just a side Question, what about THttpClient on C# is that Thread Safe?

Or how would one use that ? Open a new THttpClient for every Request?

Beste Grüße / Best Regards

Christian Schmitt
Entwickler / Developer

> Am 07.06.2016 um 17:57 schrieb BCG <bgould@hushmail.com>:
> 
> 
> 
> On 06/07/2016 10:45 AM, Tuan Le Dinh wrote:
>> 
>> Dear Matt Chambers, by mentioning "to use ThreadLocal connections", did you
>> mean use it for TTransport or TProtocol or both?
>> 
>> 
> Both TTransport and TProtocol are stateful objects that are not thread safe.  You should
not be sharing them across client instances.  You must create new ones on each Thread, or
use some method like ThreadLocal or pooling as others have suggested.
> 


Mime
View raw message