Commit 8a4aeb80 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

Enforce SingletonThreadLocal uniqueness without FOLLY_TLS

Summary: Enforce SingletonThreadLocal uniqueness without FOLLY_TLS

Reviewed By: yfeldblum

Differential Revision: D15182815

fbshipit-source-id: 5f2daba43a84092c5fdc43a4e94465446e828b5b
parent 5513c472
......@@ -158,12 +158,12 @@ class SingletonThreadLocal : private detail::SingletonThreadLocalBase {
}
FOLLY_NOINLINE static Wrapper& getWrapper() {
(void)unique; // force the object not to be thrown out as unused
return *getWrapperTL();
}
#ifdef FOLLY_TLS
FOLLY_NOINLINE static T& getSlow(Wrapper*& cache) {
(void)unique; // force the object not to be thrown out as unused
static thread_local Wrapper** check = &cache;
CHECK_EQ(check, &cache) << "inline function static thread_local merging";
static thread_local bool stale;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment