From: Christopher Dykes Date: Mon, 26 Jun 2017 18:42:42 +0000 (-0700) Subject: Resolve the circular dependency between ThreadLocalDetail and ThreadLocal X-Git-Tag: v2017.07.03.00~34 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c5184205d39da8e99b3f61b53b38e873f4d06c7c;p=folly.git 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 --- 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 { /**