From c5184205d39da8e99b3f61b53b38e873f4d06c7c Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Mon, 26 Jun 2017 11:42:42 -0700 Subject: [PATCH] Resolve the circular dependency between ThreadLocalDetail and ThreadLocal Summary: There was a circular dependency between the `detail/ThreadLocalDetail.(cpp|h)` files and `ThreadLocal.(cpp|h)`, this resolves that circular dependency by moving a couple of declarations into the detail file. Reviewed By: yfeldblum Differential Revision: D5318875 fbshipit-source-id: 61de7c4b3ffa30f9eb11bd97e0493e9de12c5804 --- folly/ThreadLocal.h | 11 +---------- folly/detail/ThreadLocalDetail.cpp | 2 +- folly/detail/ThreadLocalDetail.h | 5 +++++ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/folly/ThreadLocal.h b/folly/ThreadLocal.h index 3565c210..d67f3b82 100644 --- a/folly/ThreadLocal.h +++ b/folly/ThreadLocal.h @@ -45,19 +45,10 @@ #include #include #include +#include #include #include -namespace folly { -enum class TLPDestructionMode { - THIS_THREAD, - ALL_THREADS -}; -struct AccessModeStrict {}; -} // namespace - -#include - namespace folly { template diff --git a/folly/detail/ThreadLocalDetail.cpp b/folly/detail/ThreadLocalDetail.cpp index 67eb0565..4c036461 100644 --- a/folly/detail/ThreadLocalDetail.cpp +++ b/folly/detail/ThreadLocalDetail.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include +#include #include #include diff --git a/folly/detail/ThreadLocalDetail.h b/folly/detail/ThreadLocalDetail.h index 9c863851..fe72161a 100644 --- a/folly/detail/ThreadLocalDetail.h +++ b/folly/detail/ThreadLocalDetail.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -50,6 +51,10 @@ #endif namespace folly { + +enum class TLPDestructionMode { THIS_THREAD, ALL_THREADS }; +struct AccessModeStrict {}; + namespace threadlocal_detail { /** -- 2.34.1