EventBase across multiple threads

196 views
Skip to first unread message

va...@pinterest.com

unread,
Nov 26, 2014, 4:36:20 AM11/26/14
to faceboo...@googlegroups.com
Hi,

While trying to do async I/O in cpp2 using fbthrift, we ran into a strange error with EventBase. It seems that when we do an async call from a thrift client, it must be done in the same thread as the thread for the EventBase attached to the socket underlying the thrift client. Is this expected - I saw some recent documentation suggesting that indeed there are a lot of checks to make sure that we are running in the same thread as the EventBase' thread for doing operations on the EventBase. Is this by design, does evb_->runInEventBaseThread() not add additional thread switches and hence cause higher latencies etc. ?

Thanks
Varun

djebbi walid

unread,
Dec 16, 2014, 12:58:25 PM12/16/14
to faceboo...@googlegroups.com
comment pirater facebook
Reply all
Reply to author
Forward
0 new messages