thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Craig <>
Subject Re: C++ Callback Objects
Date Fri, 14 Jun 2013 17:10:22 GMT
I'm not sure about the cob_style stuff, but the "regular" clients aren't 
thread safe.  If multiple threads are both trying to call send_xxx at the 
same time, then you can run into trouble.

As far as docs and example code, I'm basically in the same boat as you.  I 
learned by looking at the code.

From:   David Hinkle <>
Date:   06/14/2013 11:31 AM
Subject:        C++ Callback Objects

I'm interested in using thrift from different threads asynchronously.
Right now I've put together an architecture that involves using the
standard cpp compiler.  In this setup, all the threads that want data 
send_'s.   Then they all issue recv_'s in the same order.   This allows me
to keep the latency down to a manageable level for my application.

I noticed the cob_style flag to the cpp compiler.   I did a compile and
reviewed the code and it seems to support some sort
of asynchronous callback driven model which is very interesting for my

I'm curious if these calls are thread safe, if they can be mixed with 
and recv_ calls.   Does anybody have any docs, or example code?   Also,
everything I've learned about thrift has come from reading the code.  Are
their any API docs in general?


- David

*David Hinkle*

*Senior Software Developer*

*Phone:*  800.243.3729x3000


*Hours:*  Mon-Fri   8:00AM-5:00PM (CT)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message