Add method to get the connect timeout used for an AsyncSocket
[folly.git] / folly / io / async / Request.h
index 8717503a9209db9f90db536264a6367af6f8c9ab..112f0fa8258f903d0ae1460a2ba83713a33c080c 100644 (file)
@@ -23,7 +23,6 @@
 #include <map>
 #include <memory>
 #include <glog/logging.h>
-#include <folly/ThreadLocal.h>
 #include <folly/RWSpinLock.h>
 #include <folly/SingletonThreadLocal.h>
 
@@ -130,11 +129,7 @@ class RequestContext {
   }
 
  private:
-  static std::shared_ptr<RequestContext>& getStaticContext() {
-    using SingletonT = SingletonThreadLocal<std::shared_ptr<RequestContext>>;
-    static SingletonT singleton;
-    return singleton.get();
-  }
+  static std::shared_ptr<RequestContext>& getStaticContext();
 
   folly::RWSpinLock lock;
   std::map<std::string, std::unique_ptr<RequestData>> data_;