Summary:
Use the new managed connection code in folly. Cleans things up a fair bit
The only catch was the current ConnectionManager code uses raw pointers, thrift expects shared_ptr so the request object can keep the channel around until the requests are finished
Test Plan: fbconfig -r thrift/lib/cpp2; fbmake runtests
Reviewed By: afrind@fb.com
Subscribers: trunkagent, njormrod, doug, fugalh, alandau, bmatheny, dcsommer, afrind
FB internal diff:
D1519923
Tasks:
5002343
size_t getNumConnections() const { return conns_.size(); }
+ template <typename F>
+ void iterateConns(F func) {
+ auto it = conns_.begin();
+ while ( it != conns_.end()) {
+ func(&(*it));
+ it++;
+ }
+ }
+
private:
class CloseIdleConnsCallback :
public folly::EventBase::LoopCallback,